what is the output for this question:
main()
{
int i=1;
printf("%d%d%d",i,i++,++i);
}
Answer Posted / r.aruna
answer is 3,2,2
because print the value form right to left.
so,the first one ++i means preincrement.
so,incremented one,2
second one is i++ means postincrement .
it doesn't increment store in same location
but next i means 3.because move to next location
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Explain what are the different file extensions involved when programming in c?
What is pointer and structure in c?
What do you know about the use of bit field?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What is the purpose of sprintf() function?
What is mean by data types in c?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
Difference between exit() and _exit() function?
What does the && operator do in a program code?
What is difference between static and global variable in c?
State two uses of pointers in C?
What is 02d in c?
What are types of structure?
What is the use of sizeof () in c?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?