The format specifier %d in C is used for:
A
Float
B
Integer
Correct answer
C
Character
D
String
Correct answer
B. Integer
8 views
⚔️
Challenge a friend on Computer Science FBISE Class 10
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
%d prints or reads an integer in decimal notation. %f is for floating-point values and %c for characters. Using the wrong specifier gives wrong output.
Reference
Asked in: Matric,FBISE
Doubts & discussionNot sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ Which of these is a valid variable name in C? Next MCQ › The statement k += a; is equivalent to: