[5 points) Consider the following code: #include int main() { { char str [25]; scanf("%s", str); printf("%s", s
Posted: Mon May 02, 2022 11:39 am
[5 points) Consider the following code: #include<stdio.h> int main() { { char str [25]; scanf("%s", str); printf("%s", str); return 0; } If the input is "Hello World", what will the output be? O a. Hello World b. Error Ос. н H Od. Hello
[5 points] Consider the following code: #include<stdio.h> int main() { char str[25]; fgets (str, 25, stdin); printf("%s", str); return 0; } If the input is "Hello World", what will the output be? O a. H O b. Hello O c. Error Od. Hello World
[5 points] If there is any error while closing a file, fclose will return: a. Nothing b. 100 C. NULL d. EOF .
[5 points) What does the following segment of code do: fprintf(fp, "CE264"); a. It writes "CE264" into the file pointed by fp b. Syntax error C. None of these d. It reads "CE264" from the file pointed by fp, and prints it on the screen
[5 points] Consider the following code: #include<stdio.h> int main() { char str[25]; fgets (str, 25, stdin); printf("%s", str); return 0; } If the input is "Hello World", what will the output be? O a. H O b. Hello O c. Error Od. Hello World
[5 points] If there is any error while closing a file, fclose will return: a. Nothing b. 100 C. NULL d. EOF .
[5 points) What does the following segment of code do: fprintf(fp, "CE264"); a. It writes "CE264" into the file pointed by fp b. Syntax error C. None of these d. It reads "CE264" from the file pointed by fp, and prints it on the screen