91. The parameter control string in the printf () is a C String that contains text to be . . . . . . . .
92. What will be the output of the following C code?
printf(“\n Output: %5d \t %x \t %#x”, 234,234,234);
printf(“\n Output: %5d \t %x \t %#x”, 234,234,234);
93. The syntax to print a % using printf statement can be done by . . . . . . . .
94. What will be the output of the following C code?
#include <stdio.h>
#include <stdlib.h>
int main()
{
srand(9000);
printf("%d\n", rand());
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
srand(9000);
printf("%d\n", rand());
return 0;
}
95. The conversion characters d, i, o, u, and x may be preceded by h in scanf() to indicate?
96. The maximum number of characters to be printed is specified by . . . . . . . .
97. In function free(p), p is a . . . . . . . .
98. What will be the output of the following code?
char t=’N’;
printf(“\n %c \n %3c \n %5c”,t,t,t);
char t=’N’;
printf(“\n %c \n %3c \n %5c”,t,t,t);
99. What will be the output of the following C code?
#include <stdio.h>
int main(int argc, char** argv)
{
char *s = "myworld";
int i = 3;
printf("%10.*s", i, s);
}
#include <stdio.h>
int main(int argc, char** argv)
{
char *s = "myworld";
int i = 3;
printf("%10.*s", i, s);
}
100. What is the output of the following C code if there is no error in stream fp?
#include <stdio.h>
int main()
{
FILE *fp;
fp = fopen("newfile", "w");
printf("%d\n", ferror(fp));
return 0;
}
#include <stdio.h>
int main()
{
FILE *fp;
fp = fopen("newfile", "w");
printf("%d\n", ferror(fp));
return 0;
}
Read More Section(File Input Output)
Each Section contains maximum 100 MCQs question on File Input Output. To get more questions visit other sections.