So we have to use ++ (*p)
Eg, consider strcpy() function.
char *strcpy(char *dest, const char *src)So here first thing that is happening in while loop is dest and src are incremented by 1
{
char *save = dest;
while(*dest++ = *src++);
return save;
}
Than they are referenced by *
Then equated and finally loop moves on until it gets '\0'..i.e null
No comments:
Post a Comment