31. Which of the following is used during memory deallocation in C?
32. What is the difference in the ASCII value of capital and non-capital of the same letter is?
33. In the following C program, every time program is run different numbers are generated.
#include <stdio.h>
int main()
{
srand(time(NULL));
printf("%d\n", rand());
return 0;
}
#include <stdio.h>
int main()
{
srand(time(NULL));
printf("%d\n", rand());
return 0;
}34. What will be the output of the following C code?
#include <stdio.h>
int main()
{
int i = 10, j = 3, k = 3;
printf("%d %d ", i, j, k);
}
#include <stdio.h>
int main()
{
int i = 10, j = 3, k = 3;
printf("%d %d ", i, j, k);
}35. Select the right explanation for the following C code snippet.
int fgetpos(FILE *stream, fpos_t *s)
int fgetpos(FILE *stream, fpos_t *s)36. What will be the output of the following C code if 2 characters is typed by the user?
#include <stdio.h>
#include <string.h>
int main()
{
char line[3];
fgets(line, 3, stdin);
printf("%d\n", line[2]);
return 0;
}
#include <stdio.h>
#include <string.h>
int main()
{
char line[3];
fgets(line, 3, stdin);
printf("%d\n", line[2]);
return 0;
}37. What will be the output of the following C code?
char str[] =”Too Good”;
printf(“\n %7s”,str);
char str[] =”Too Good”;
printf(“\n %7s”,str);38. What will be the output of the following C code?
#include <stdio.h>
#include <math.h>
void main()
{
int k = pow(2, 3);
printf("%d\n", k);
}
#include <stdio.h>
#include <math.h>
void main()
{
int k = pow(2, 3);
printf("%d\n", k);
}39. Which of the following library function is not case-sensitive?
40. What will be the output of the following C code?
#include <stdio.h>
int main()
{
char *s = "myworld";
int i = 9;
printf("%*s", i, s);
}
#include <stdio.h>
int main()
{
char *s = "myworld";
int i = 9;
printf("%*s", i, s);
}Read More Section(File Input Output)
Each Section contains maximum 100 MCQs question on File Input Output. To get more questions visit other sections.
