Explore topic-wise MCQs in C Interview.

This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your C Interview knowledge and support exam preparation. Choose a topic below to get started.

1.

The conversion characters d, i, o, u, and x may be preceded by h in scanf() to indicate?

A. A pointer to short
B. A pointer to long
C. Nothing
D. Error
Answer» E.
2.

Scans the string according to the format in format and stores the resulting values through arg1, arg2, etc

A. The arguments arg1,arg2 etc must be pointers
B. Scans the string according to the format in format and stores the resulting values through arg1, arg2, etc, those arguments arg1,arg2 etc must be pointers
C. None of the mentioned
Answer» B. Scans the string according to the format in format and stores the resulting values through arg1, arg2, etc, those arguments arg1,arg2 etc must be pointers
3.

Prints the number that was entered

A. Segmentation fault
B. Nothing
C. Varies
Answer» D.
4.

What does scanf() function return?

A. Number of successfully matched and assigned input items
B. Nothing
C. Number of characters properly printed
D. Error
Answer» C. Number of characters properly printed
5.

Which of the following represents the function for scanf()?

A. void scanf(char *format, …)
B. int scanf(char *format, …)
C. char scanf(int format, …)
D. char *scanf(char *format, …)
Answer» E.
6.

Which of the following is an invalid method for input?

A. scanf(“%d%d%d”,&a, &b, &c);
B. scanf(“%d %d %d”, &a, &b, &c);
C. scanf(“Three values are %d %d %d”,&a,&b,&c);
D. none of the mentioned
Answer» B. scanf(‚Äö√Ñ√∂‚àö√ë‚àö‚à´%d %d %d‚Äö√Ñ√∂‚àö√ë‚àöœÄ, &a, &b, &c);