#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

Why you shifting job every other year?

1 Answers  


What clr do u like?

1 Answers  


HI frds,,,am final yr IT student.. i secured 81% in x 55% in xii 87% in Btech upto last sem (no standing arrears..) i dt kw clearly abt MNC eligibility criteria.. i heard tat TCS hired 1y abv 60% 1y..so pls help me.. wic cmpnys r anouncd 55% may eligibl in 2011??? pls rly me clearly and sugst som of d compny names...

1 Answers  


what is the need to take testing as a carrier?

2 Answers  


How many codes are used when u design a Pressure Vessel

0 Answers  






10. Each alphabet stands for one digit in the following multiplication. T H I S x I S --------- X F X X X X U X ------------ X X N X X ------------ What is the maximum value T can take?

4 Answers   eLitmus, Infosys, Verchaska,


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.

0 Answers  


how 2 write a program of this pattern usin for loop?? 1 2 3 4 5 6 7 8 9 10

0 Answers  


A. Compare the advantages and disadvantages of a three- dimensional monitor using a varifocal mirror with a stereoscopic system. B. Write a routine to implement the polymarker function.

1 Answers  


Explain Belady's Anomaly.

0 Answers  


Hi dost here Alok Kumar please send question pattern for NIC at godinall.kumar1@gmail.com or alok.iitb07@gmail.com

0 Answers  


HELLO ALL OF U.I HAVE QUALIFIED IN SBI CLERICAL WRITTEN EXAMINATION AND MY INTERVIEW IS ON 20TH OF THIS MONTH.IAM SOTWARE BACKGROUNDED CANIDIATE SO CAN ANY ANYBODY WHOSE INTERVIEW IS OVER CAN TELL ME THAT WHAT QUESTIONS THEY ASKED RELATING TO COMPUTER SCIENCE.

0 Answers  


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