void main()
{
int a=1;
printf("%d %d %d",a,++a,a++);
}
the output is supposed to be 1 2 2....but it is 3 3 1
this is due to calling conventions of C. if anyone can
explain me how it happens?
Answer Posted / vishnu
first calculations will be done from right to left and then
prints accroding to the parameters passed.
| Is This Answer Correct ? | 29 Yes | 8 No |
Post New Answer View All Answers
What is declaration and definition in c?
What is a const pointer in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What is the best organizational structure?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
Explain what is the difference between a string and an array?
What is a double c?
What is double pointer in c?
In which layer of the network datastructure format change is done
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
What is pointer to pointer in c with example?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What is pointer to pointer in c language?
can any one provide me the notes of data structure for ignou cs-62 paper
What is a scope resolution operator in c?