Skip to content
Related Articles

Related Articles

C | Input and Output | Question 13
  • Difficulty Level : Basic
  • Last Updated : 08 May, 2017

Predict the output of following program?

#include "stdio.h"
int main()
    char arr[100];
    printf("%d", scanf("%s", arr));
    /* Suppose that input value given
        for above scanf is "GeeksQuiz" */
    return 1;

(A) 9
(B) 1
(C) 10
(D) 100

Answer: (B)
Explanation: In C, scanf returns the no. of inputs it has successfully read. See
Quiz of this Question

Thank You for reading the Post !

Want to learn from the best curated videos and practice problems, check out the C Foundation Course for Basic to Advanced C.
My Personal Notes arrow_drop_up
Recommended Articles
Page :