470,575 Members | 1,182 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,575 developers. It's quick & easy.

exam snippet, wont be able to use compiler so can someone explain this?

1
#include <stdio.h>

int main()
{
int x=3, i=0;
do{
x=x++;
i++;
}while(i!=3);

printf("%d",x);

return 0;
}
Apr 6 '21 #1
2 4951
dev7060
569 Expert 512MB
exam snippet, wont be able to use compiler so can someone explain this?
Explain what?   ⠀⠀   
Apr 7 '21 #2
donbock
2,425 Expert 2GB
What a curious exam question. No matter what answer you give, nobody can say you're wrong, but nobody can say you're right either.
Apr 23 '21 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by Maciej Nadolski | last post: by
8 posts views Thread by Igor Raytsin | last post: by
5 posts views Thread by J Allen Horner | last post: by
5 posts views Thread by klj_mcsd | last post: by
4 posts views Thread by Richard L Rosenheim | last post: by
7 posts views Thread by CMirandaman | last post: by
3 posts views Thread by Angus | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.