+ 7

Predict the output of following program? #include "stdio.h" int main() { char arr[100]; printf("%d", scanf("%s", arr));

Suppose entered string is Raj Kalash Tiwari.......

28th Mar 2020, 3:49 AM
Raj Kalash Tiwari
Raj Kalash Tiwari - avatar
4 odpowiedzi
+ 1
See what is returned by scanf, https://www.cplusplus.com/reference/cstdio/scanf/ So the output should be 1
28th Mar 2020, 1:54 PM
Mahmud Nabil
Mahmud Nabil - avatar
+ 3
Becuase it is a c program........
28th Mar 2020, 3:58 AM
Raj Kalash Tiwari
Raj Kalash Tiwari - avatar
0
No need to wonder ... Go to Code Playground, make new C code, paste the text, run Voila!
28th Mar 2020, 4:43 AM
Ipang
0
There is a mistake that you didn't write the tag.
28th Mar 2020, 11:52 AM
‎حمزة احمد‎
‎حمزة احمد‎ - avatar