Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: while (*p++); Pin
John R. Shaw30-Oct-05 16:09
John R. Shaw30-Oct-05 16:09 
AnswerRe: while (*p++); Pin
Christian Graus26-Oct-05 17:11
protectorChristian Graus26-Oct-05 17:11 
GeneralRe: while (*p++); Pin
Anonymous26-Oct-05 18:39
Anonymous26-Oct-05 18:39 
GeneralRe: while (*p++); Pin
Christian Graus27-Oct-05 12:00
protectorChristian Graus27-Oct-05 12:00 
GeneralRe: while (*p++); Pin
Chintoo72327-Oct-05 16:33
Chintoo72327-Oct-05 16:33 
AnswerRe: while (*p++); Pin
sunit526-Oct-05 19:26
sunit526-Oct-05 19:26 
GeneralRe: while (*p++); Pin
Ghasrfakhri26-Oct-05 20:24
Ghasrfakhri26-Oct-05 20:24 
GeneralRe: while (*p++); Pin
sunit526-Oct-05 23:13
sunit526-Oct-05 23:13 
execution will take place from right to left
first the address store in p gets incremented then the derefrence of the pointer(new address stored in p) will take place.
Finally the condition will be checked by while loop.If it is non zero statements enclosed by while loop braces will be exceuted otherwise not.

There was a mistake in my previous post.I have rectified it

//first the derefrence of the pointer will take place and then according to that value conditon is checked

//check the condition in while
if(*p)
{
p++;
// statements inside while loop are executed
}
else //when while loop fails
{p++;}
//statements after while loop

-- modified at 6:12 Thursday 27th October, 2005
AnswerRe: while (*p++); Pin
Roger Stoltz26-Oct-05 21:47
Roger Stoltz26-Oct-05 21:47 
AnswerRe: while (*p++); Pin
Carsten Leue27-Oct-05 2:23
Carsten Leue27-Oct-05 2:23 
GeneralRe: while (*p++); Pin
Chintoo72327-Oct-05 5:42
Chintoo72327-Oct-05 5:42 
GeneralRe: while (*p++); Pin
Carsten Leue29-Oct-05 11:09
Carsten Leue29-Oct-05 11:09 
AnswerRe: while (*p++); Pin
TheGreatAndPowerfulOz27-Oct-05 8:53
TheGreatAndPowerfulOz27-Oct-05 8:53 
GeneralRe: while (*p++); Pin
TheGreatAndPowerfulOz27-Oct-05 8:57
TheGreatAndPowerfulOz27-Oct-05 8:57 
GeneralRe: while (*p++); Pin
Chintoo72327-Oct-05 16:38
Chintoo72327-Oct-05 16:38 
GeneralRe: while (*p++); Pin
TheGreatAndPowerfulOz28-Oct-05 3:18
TheGreatAndPowerfulOz28-Oct-05 3:18 
Questionc++ question Pin
dizzzzy2326-Oct-05 16:17
dizzzzy2326-Oct-05 16:17 
AnswerRe: c++ question Pin
Christian Graus26-Oct-05 16:42
protectorChristian Graus26-Oct-05 16:42 
GeneralRe: c++ question Pin
dizzzzy2326-Oct-05 16:57
dizzzzy2326-Oct-05 16:57 
GeneralRe: c++ question Pin
Christian Graus26-Oct-05 17:00
protectorChristian Graus26-Oct-05 17:00 
GeneralRe: c++ question Pin
John R. Shaw26-Oct-05 17:31
John R. Shaw26-Oct-05 17:31 
GeneralRe: c++ question Pin
John R. Shaw26-Oct-05 17:05
John R. Shaw26-Oct-05 17:05 
GeneralRe: c++ question Pin
dizzzzy2326-Oct-05 17:07
dizzzzy2326-Oct-05 17:07 
GeneralRe: c++ question Pin
John R. Shaw26-Oct-05 17:40
John R. Shaw26-Oct-05 17:40 
GeneralRe: c++ question Pin
dizzzzy2326-Oct-05 17:54
dizzzzy2326-Oct-05 17:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.