void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / koushik ramesh
this program output is 12.
first is i++ is 5 only because this the post increment
first using the value after increment.
whenever i++ + the value of is 6.
++ i means this is the pre-increment.first increment
the value after using the variable this step i will become
7.
total is i++ =5
i++ + =6
++ i=7
i++ + ++i= 12. this is posted by Ramesh(MCA)Nizam
college.HYDERABAD
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
Write a program to reverse a given number in c language?
Are pointers integers in c?
Do you know pointer in c?
What is an identifier?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
How can I insert or delete a line (or record) in the middle of a file?
Why flag is used in c?
Why is %d used in c?
Are comments included during the compilation stage and placed in the EXE file as well?
Can a file other than a .h file be included with #include?
What is the right type to use for boolean values in c?
Is array name a pointer?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What Is The Difference Between Null And Void Pointer?
What is the main difference between calloc () and malloc ()?