Current when capacitor and resistor placed in parallel? If the question is too long please comment to shorten it atleast , I really need an answer.
I have just started learning about RC circuits and these circuits are confusing me.My questions-1)What will be the current in diagram A just at the moment the switch is closed , The capacitor and resistor are connected in parallel so I think that the resistor will draw a current $I=\frac{V}{R}$ but the capacitor is an ideal one therefore has no resistance and therefore draws an infinite amount of current which eventually stops when the capacitor is completely charged so overall , The circuit is drawing infinite amount of current from the battery. Have I correctly understood this ?2)The actual confusion starts when I come to circuit B , there too the capacitor is in parallel with a resistor , but those two together are in series with another identical resistor , so I guess , that there will be a certain finite amount of current flowing through the circuit , just at the moment the switch is closed  , now I get confused-There will be a potential difference across the resistor in parallel to capacitor and that potential difference will be resposnsible for charging it , now I am reminded of circuit A where there was a capacitor connected to the battery voltage without a resistor in series with it , in circuit B too , capacitor is attached to a certain voltage (same as across parallel resistor) without a series resistor with it , so wont there be an infinite current here too ?
In short , whats the difference between voltage provided by battery and voltage provided across a resistor , Please explain me the circuit B .
 A: What is interesting is that the OP did not include circuit diagram (3) which perhaps is a more familiar situation?  
 
In circuit 1 resistor $S$ is zero and in circuit 3 resistor $P$ is infinite and so circuits 1 and 3 are variations of circuit 2.  
In all three circuits the capacitor $C$ starts off uncharged and final value of the voltage across the capacitor reaches a steady value determined by the values of the supply voltage $V$ and the resistances of the resistors.  
For circuits 1 and 3 the final voltage across the capacitor is $V$ whilst for circuit 2 the final voltage is $\left (\frac{P}{P+S}\right )\, V$ with the chain of resistors acting as a potential divider.
Note that as $S \to 0$ then $\left (\frac{P}{P+S}\right )\, V\to V$ which is circuit 1, and as $P \to \infty$ then $\left (\frac{P}{P+S}\right )\, V\to V$ which is circuit 3.  
In each circuit the voltage across the capacitor will be given by $V_{\rm C}(t) = V_{\rm final}  \left( 1 - \exp\left( \frac t \tau\right)\right)$ where $\tau$ is the time constant of the circuit.  
The form of the time constant will be the product of a capacitance value and a resistance value, $R_{\rm effective}C_{\rm effective}$.  
For circuit 3 the time constant is $SC$ and for circuit 1 the time constant is $0$ and that of circuit 2 will be somewhere between those two values.  
The current in the capacitor branch of the circuit $I_{\rm C}(t)=I_{\rm initial}\exp \left(\frac  t \tau\right) $ where $I_{\rm initial} = \frac VS$ as initially all the supply voltage must be across resistor $S$ as there is no voltage across the capacitor.  
What I am trying to show is that knowledge of what happens in circuit 3 can be used to predict what happens in circuits 1 and 2.  

Finding the time constant, $\tau$, for each circuit is a little more complicated.  
Suppose the voltage source was not there and the capacitor was charged and with the switch close the capacitor discharges.
The time constant of the circuit is $\left (\frac{SP}{S+P}\right)\,C$ where $\left (\frac{SP}{S+P}\right)$ is the effective of two resistors of resistance $S$ and $P$ in parallel.  
This is also the time constant of the circuit when the capacitor is being charged giving $\tau \to 0$ as $S\to 0$ which is circuit 1 and $\tau \to SC$ as $P \to \infty$ which is circuit 3.  
This is not a proof which can be done using circuit analysis but a way of getting to an "answer" using previously gained knowledge.  

Perhaps what my answer also shows is that it is perhaps better to include "extra" components in the analysis and then see what happens as their value tends to be very small or very large?
Such an approach will help with the impossible to achieve infinite current and the impossible to achieve instantaneous change of current by including "stray" resistance, capacitance and inductance in the circuit.
For a standard laboratory experiment such refinement is not usually necessary but can be very important in some branches eg digital switching as happens in computer circuitry.
A: 
The circuit is drawing infinite amount of current from the battery. Have I correctly understood this ?

Yes.

There will be a potential difference across the resistor in parallel to capacitor and that potential difference will be resposnsible for charging it

The potential across the capacitor can't change instantaneously.
Therefore in the time immediately after the switch closes, the voltage across the resistor (the one in parallel with the capacitor) is zero. From Ohm's law, then, there is no current through this resistor in that instant.
To find the current that is charging the capacitor (in the instant immediately after closing the switch), you can use KCL at the node where the capacitor and the two resistors are all connected.
Alternately, you can replace the voltage source and the two resistors with a Thevenin equivalent circuit, and again find the charging current as time progresses after the switch is closed.
A: I want to address what I believe is a misconception regarding circuit A:

The capacitor and resistor are connected in parallel so I think that
  the resistor will draw a current I=VR but the capacitor is an ideal
  one therefore has no resistance and therefore draws an infinite amount
  of current which eventually stops when the capacitor is completely
  charged so overall

There is a subtle problem here with the logic.  First, assuming an ideal circuit context, the voltage across the voltage source is fixed and there is no resistance in series with the capacitor.  Thus, just after the switch is closed, the capacitor is 'fully charged', i.e., the voltage across the capacitor is constant and equal to the voltage across the voltage source just after the switch is closed.
This can only be the case if the charging current is an impulse (infinitely large for infinitesimal time).
$i_C(t) = CV\,\delta(t)$
Since the voltage across a capacitor is the integral of the current, we have
$$v_C(t) = \frac{1}{C}\int_{-\infty}^ti_C(\tau)\,\mbox{d}\tau = \frac{1}{C}\,CV\,u(t) = V\,u(t)$$
where $u(t)$ is the unit step function.  So, the capacitor instantaneously charges to $V$ due to the current impulse.
(Please note that this is entirely non-physical due to the limitations of ideal circuit theory which have been addressed here many times)
A: First of all I agree with @The Photon answer and upvoted it. I would only add the following to his first response to this statement of yours.
The circuit is drawing infinite amount of current from the battery. Have I correctly understood this ?
The answer is yes, but only if the battery is an ideal voltage source, that is, a source without any source impedance. All real batteries have internal resistance. For that matter all wires and the capacitor have resistance. But the battery resistance will probably be greater than the wire and capacitor resistance. The diagram below shows a real battery with internal resistance,$R_b$.
So when the switch is closed, and the capacitor looks like a short circuit since you can't change the voltage across it in zero time, but the batteries internal resistance $R_b$ will be in series with the capacitor and limit the current.
Hope this helps to supplement and support @The Photon answer.

