What is the output when the following segment of ‘C’ code is executed? void…

PYQ Coal India Management Trainee CBT 2017

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. A.

    123.450, 123.4560, 1.234560e+02

  2. B.

    123.46, 123.456, 1.234560e+02

  3. C.

    123.456000, 123.456, 0.1234560e+03

  4. D.

    123.45, 123.4560, 1.234560e+02

Attempted by 2007 students.

Sign up free to check your answer

Sign up free

Explore the full course: Coal India Management Trainee

Loading lesson…