as in the title, what’s the difference because these two seem to get me the same results?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No they are not the same. Assume that
dis a pointer toint:I think there is an example in K&R where we need to copy a c-string to another:
The code is simple, put the character pointed by
firstinto the character pointed bysecond, then increment both pointers after the expression. Of course when the last character is copied which is ‘\0’, the expression results tofalseand it stops!