Chapter - 12: Console Input-Output

To receive the string "We have got the guts, you get the glory!!" in an array char str[100] which of the following functions would you use?


C
Sections
1
Exercises

1. scanf ( "%s", str ) ;
2. gets ( str ) ;
3. getche ( str ) ;
4. fgetchar ( str ) ; 


Ans: 2. gets(str);


© 2020 Garbage Valuegarbage value logo