a=5
a=a++/++a

Answer Posted / harinath

as the above person said the answer is right but
at first the evaluation starts from denominator, according
to operator precedence pre-increment has more value than
other two(/ and post-increment)
so at first ++a=6 is assigned to a
now the value in a is 6 .so 6/6 gives the value 1.
then post-increment occurs to the value in a(ie.,1).
so the value of a is finally 2(1+1).

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is getch c?

847


Are the variables argc and argv are always local to main?

569


What are volatile variables in c?

515


is it possible to create your own header files?

631


What is union in c?

630






What is new line escape sequence?

805


What is a union?

607


What does != Mean in c?

582


How do you use a 'Local Block'?

714


How to get string length of given string in c?

604


What are the characteristics of arrays in c?

609


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2513


You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.

1778


What are header files and what are its uses in C programming?

625


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1368