1. Home
  2. Computer Science MCQs
  3. C Programming
  4. Which format specifier is used in printf() to display a…

Added 30 Nov -0001

Which format specifier is used in printf() to display a float value?

  1. %f Correct answer
  2. %d
  3. %c
  4. %s

Correct answer

A. %f

18 views

MCQSEXAM

Explanation

%f prints floating-point values; %d prints integers, %c characters and %s strings.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More C Programming MCQs

Practise all C Programming MCQs

Similar MCQs