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
What does the && operator do in a program code?
Once I have used freopen, how can I get the original stdout (or stdin) back?
What are the modifiers available in c programming language?
What is the value of h?
Explain threaded binary trees?
How can I recover the file name given an open stream or file descriptor?
write a progrmm in c language take user interface generate table using for loop?
What is getch c?
Write a program to know whether the input number is an armstrong number.
What are the types of operators in c?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
Not all reserved words are written in lowercase. TRUE or FALSE?
Can a variable be both static and volatile in c?
How can I dynamically allocate arrays?
What is an auto keyword in c?