C | Input and Output | Question 13
Predict the output of following program?
#include "stdio.h"
int main()
{
char arr[100];
printf ( "%d" , scanf ( "%s" , arr));
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 https://www.geeksforgeeks.org/archives/674
Quiz of this Question
Thank You for reading the Post !
Last Updated :
28 Jun, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...