#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



#include<stdio.h> int main(){ int a=5; printf("%d %d %d",a++,a++,++a); ..

Answer / 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

More Engineering AllOther Interview Questions

I an doing Engineering in IT(4th year). i want to know what is the scope or .NET and Linux, and which is better for carrier

0 Answers  


What is the 911 point?

1 Answers  


Whatis Bandwidth?

2 Answers   Elgi Equipments,


what are purchase order , sales order idoc names and idoc types

0 Answers   HCL,


How to trouble of routing protocol like EIGRP and OSPF

1 Answers   NetMagic,


why c is called middle level langauge?

0 Answers   Wipro,


PREVIOUS AND NEW companies positive and negative points AFTER LIVING

0 Answers  


Write a Java program that takes an integer from the user and extracts and displays each digit of the integer in English. So, if the user types in 932, the program will display nine three two. [Use SimpleInput class]

0 Answers  


A man, a woman, and a child can do a piece of work in 6 days. Man only can do it in 24 days. Woman can do it in 16 days and in how many days child can do the same work? (WITH EXPLANATION)

2 Answers   TCS,


multithreading??

0 Answers  


Email bombing is

1 Answers   NIC,


am looking for ms,i got ielts score 5.5,and i dont have english score 60 in any any year.tell me can i get offer lettr from any university.is i am elegible..?

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5086)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4453)
  • Electrical Engineering Interview Questions Electrical Engineering (16638)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)