+ 1

What is the output of the code?

int main() { int a; a= scanf("%d%d%d"); printf("%d",a); }

22nd Jun 2018, 3:35 PM
Aacharan Jain
Aacharan Jain - avatar
1 Answer
+ 1
The output of the code will depend on the inputs provided during runtime. The scanf function is used to read input from the user, but in this case, it is missing the input placeholders for %d%d%d. Therefore, it will not store any values in a and will just return the number of successfully input items, which will most likely be 0. So, the output will be 0.
13th Apr 2024, 5:32 PM
`ᎎᔗᔗዚ
`ᎎᔗᔗዚ - avatar