What is the output of the following C program? #in...
Guiding State PSC aspirants since 2016 50,000+ students · 1,000+ final selections Exam Calendar Results Call 9116926003
pscnotes
Pick your state
GPSC Prelims previous year questions

What is the output of the following C program? #include <stdio.h> int main() { float Y = 98.7654; printf("%7.2f\n", Y); printf("%e\n", Y); return 0; }

Asked in GPSC ICT Officer, Class-2 2026

  1. 98.76 and 9.87654
  2. 98.77 and 9.876540e+01
  3. 98.7654 and 9.8e+01
  4. Compilation error
Show answer

Answer: B. 98.77 and 9.876540e+01

This previous-year question came without the commission's answer key; the answer was checked by AI. Always confirm with the official key.

More GPSC Prelims previous year questions questions

All 26,263 GPSC Prelims previous year questions questions →