C Programming :: Basic Concepts - Discussion
5 / 90
main()
{
int a;
printf("%d",scanf(%d,&a));
}
main()
{
int a;
printf("%d",scanf(%d,&a));
}
A0
B1
CAs per Input
DNone of the above
Show Explanation
Incorrect answer
Answer is : 1
scanf returns the number of inputs scanned
Asked In ::
Incorrect answer.
Scanf returns the number of inputs that are successfully scanned.
Proof:-
Read Full Answer
Report Error
Please Login First Click Here
It will give an error. Inside the scanf() function, the format specifier used, i.e, %d should be enclosed within double quotes(" ").
Even if we correct it, the output will be 1, as the no. of input scanned here is 1, and printf() function will return the no. of arguments which are scanned here, hence it will return 1.
Read Full Answer
Report Error
Please Login First Click Here
Incorrect answer
Answer is : 1
scanf returns the number of inputs scanned
Read Full Answer
Report Error
Please Login First Click Here