#include<stdio.h>
int main(){
int a=5;
printf("%d %d %d",a++,a++,++a);
return 0;
}..please explain me output 7 6 8..Thnx in advance

Answer Posted / abhijeet ankush gate rank 416

correct output is 766
explaination
printf function is right associative and starts reading from
right which is ++a.
in ++a value is 1st incremented and then printed
in a++ value is 1st printed and then incremented...

Is This Answer Correct ?    10 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

in b+ trees, all the data is stored in leaf nodes. if all leaf nodes are crashed then how to get/recovery the data back?

1508


what is the difference between embedded system and PLC. Whether the micro controller accept future expansion of program?

3759


what is the difference between a decision statement and ea loop statement?

1872


how many gallon in one quseka

1398


what is difference between Fault tolerance Vs fault avoidance

3506






what does static variable mean in c language?

1807


What do you mean by component versionig?

1448


i need NIC written test paper or give me any idea about written exam.Plz send me at smileever8@gmail.com

1679


what is 16kHz use in GSM

1641


what is the main fuction of OSPF in a internetwork? how does work of same network?

1436


differance between radix sort and radix exchange sort

2848


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1284


what is mean by tranducer

1634


when does the official confirmation or the offer letter for the 2012 selected candidates of HUAWEI will come??

1451


Explain a situation in which you handled a customer?s questions or problems?

1470