#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

to which generation of prog. languages does ai prog languages belong

0 Answers   Intel,


Write a program to maintain a singly linked list having the following functions: a) Creation of the list b) Displaying the list. c) Swap all nodes at consecutive even odd positions. E.g.: The nodes at position 1 should be swapped with node 2, node 3 with node 4 and so on.

0 Answers   C DAC, CDAC,


i have passed my gRaduation in BCA and now im looking for post graduation from Germany, i haver passed my ielts wth 6 band, nw plz tell me some question that wll ambessay ask

0 Answers  


XSL and XSLD difference

0 Answers  


What does balanced amplifier consist of?

1 Answers  


What a test plan contains

0 Answers   Sonata,


THESE POSTS ARE FOR THE DURATION OF FIVE YEARS. AFTER COMPLETION OF FIVE YEARS, THE PERSONNEL POSTED AGAINST THESE POSTS ARE LIKELY TO BE CONTINUED IN NIC. CAN Any body say that what it will be happened after 5 years? does they through us out from NIC? Is it a temporary job of 5 years is the probation period?

0 Answers   NIC,


minimum percentage in B.E in(INFORMATION TECHNOLOGY) to be eligible for IES exam qualification and also for reserved categories.are IT engineers are eligible for giving IES exams? please reply soon.

0 Answers  


what are the different types of datasets? what are their characteristics and properties? what are the advantages and disadvantages over others?.

1 Answers   OVGU,


Please can any tell what is the difference between method overloading and overriding in c#.net ?

2 Answers  


write a programe to print this string in reverse order and find out how many times letter c is repeated? string = { c was desined by dennis ritchie}. also find out the lenth of the string.

0 Answers  


hi, i applied for AIRPORTS AUTHORITY OF INDIA for the post of AIR TRAFFIC CONTROLLER(ATC)..so plz send me the sample questions to my id...88arun@gmail.com

0 Answers   AAI Airports Authority Of India, Insurance, Nokia,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • 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)