Question 186Asked in CIL MT Systems, 26 Mar 2017 (12:30 PM)

What is the output when the following segment of 'C' code is executed?

What is the output when the following segment of 'C' code is executed? void main(){ float a = 123.456; printf("%7.2f, %7.3f, %12e", a, a, a); }
  1. A123.450, 123.4560, 1.234560e+02
  2. B123.46, 123.456, 1.234560e+02
  3. C123.456000, 123.456, 0.1234560e+03
  4. D123.45, 123.4560, 1.234560e+02
Show answerHide answer

Correct answer: (B) 123.46, 123.456, 1.234560e+02

From CIL MT Systems PYQ, 26 Mar 2017 (12:30 PM)

This is question 186 of CIL MT Systems PYQ, 26 Mar 2017 (12:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.