main()
{
int i = 10;
printf(" %d %d %d \n", ++i, i++, ++i);
}
Answer Posted / dr. sanyasi naidu pasala
13 11 11
First the value of i was assigned to right most variable ++i. In this first i value which is 10 will be incremented to 11, then assigned to i and printed as 11. Then that 11 is passed to the middle variable which is i++. In this first the value 11 is assigned to i, print the value of i as 11 and then incremented to 12. This 12 is now passed to left most variable ++i. In this the value 12 is first incremented to 13 then assigned to i and print as 13. Even though generally the evaluation will be taken place from right most variable to left most variable, the evaluation process may vary from operating system to operating system.
Is This Answer Correct ? | 27 Yes | 11 No |
Post New Answer View All Answers
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
When can you use a pointer with a function?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Why do we use null pointer?
What is difference between constant pointer and constant variable?
Write a program to know whether the input number is an armstrong number.
What are the types of variables in c?
Why calloc is better than malloc?
Can you write the function prototype, definition and mention the other requirements.
what is the height of tree if leaf node is at level 3. please explain
What is array of structure in c programming?
write a c program in such a way that if we enter the today date the output should be next day's date.
Where are some collections of useful code fragments and examples?
Explain what does it mean when a pointer is used in an if statement?
What is cohesion and coupling in c?