void main()
{
int a=1;
printf("%d %d %d",a,++a,a++);
}
the output is supposed to be 1 2 2....but it is 3 3 1
this is due to calling conventions of C. if anyone can
explain me how it happens?

Answer Posted / minchoo

answer is 2 2 1 and not 3 3 1

Is This Answer Correct ?    4 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Sir i need notes for structure,functions,pointers in c language can you help me please

1939


What is const volatile variable in c?

565


How are structure passing and returning implemented?

585


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4973


Why doesnt the call scanf work?

658






What happens if a header file is included twice?

580


What is the size of structure in c?

691


What is the use of getchar functions?

666


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1289


How many types of functions are there in c?

578


Is c object oriented?

534


Why pointers are used?

627


Which is an example of a structural homology?

769


Explain the Difference between the New and Malloc keyword.

676


What is function in c with example?

619