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
Which is better pointer or array?
What are the features of the c language?
What is static identifier?
Do pointers need to be initialized?
What will be the outcome of the following conditional statement if the value of variable s is 10?
write a programming in c to find the sum of all elements in an array through function.
Why do we use return in c?
What are the difference between a free-standing and a hosted environment?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Which are low level languages?
What are the types of data files?
What is a structure in c language. how to initialise a structure in c?
Explain what is meant by 'bit masking'?
Explain what is gets() function?
Explain what is wrong with this program statement? Void = 10;