Input & Output
- What is the purpose of sprintf?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
It writes the formatted data into a string
- The syntax to print a % using printf statement can be done by ________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
%%
- What is the meaning of the following C statement?
printf(“%10s”, state);
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Print empty spaces if the string state is less than 10 characters
- What are the Properties of first argument of a printf() functions?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
It keeps the record of the types of arguments that will follow
- What will be the output of the following C code?
#include <stdio.h>
int main()
{
int num;
scanf("%d", num);
printf("%d\n", num);
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Undefined behavior