Q201
Open question#include <stdio.h>
int main()
{
FILE *fp = stdin;
int n;
fprintf(fp, "%d", 45);
}Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
296
Questions
11/15
Page
Pick an option on a question to see the right answer and solution.
Q201
Open question#include <stdio.h>
int main()
{
FILE *fp = stdin;
int n;
fprintf(fp, "%d", 45);
}Select an option to see the answer and solution.
Q202
Open question#include <stdio.h>
#include <string.h>
int main()
{
char *str = "hello, world";
char *str1 = "hello, world";
if (strcmp(str, str1))
printf("equal");
else
printf("unequal");
}Select an option to see the answer and solution.
Q203
Open questionSelect an option to see the answer and solution.
Q204
Open questionSelect an option to see the answer and solution.
Q205
Open question#include <stdio.h>
int main()
{
int n;
scanf("%d", n);
printf("%d\n", n);
return 0;
}Select an option to see the answer and solution.
Q206
Open questionSelect an option to see the answer and solution.
Q207
Open questionSelect an option to see the answer and solution.
Q208
Open question#include <stdio.h>
#include <string.h>
int main()
{
char *str = "hello, world";
char str1[9];
strncpy(str1, str, 9);
printf("%s %d", str1, strlen(str1));
}Select an option to see the answer and solution.
Q209
Open questiongcc -o test test.c
./test > myfile
#include <stdio.h>
int main(int argc, char **argv)
{
char c = 'd';
putchar(c);
printf(" %d\n", argc);
}Select an option to see the answer and solution.
Q210
Open question#include <stdio.h>
int main()
{
char c = '�';
putchar(c);
}Select an option to see the answer and solution.
Q211
Open questionSelect an option to see the answer and solution.
Q212
Open questionint ferror(FILE *fp)Select an option to see the answer and solution.
Q213
Open questionrealloc(ptr, size)Select an option to see the answer and solution.
Q214
Open questionprintf(“%*. *f”, 5,4,5700);Select an option to see the answer and solution.
Q215
Open question#include <stdio.h>
struct p
{
struct p *next;
int x;
};
int main()
{
struct p *p1 = (struct p*)malloc(sizeof(struct p));
p1->x = 1;
p1->next = (struct p*)malloc(sizeof(struct p));
return 0;
}Select an option to see the answer and solution.
Q216
Open questionSelect an option to see the answer and solution.
Q217
Open question#include <stdio.h>
struct p
{
struct p *next;
int x;
};
int main()
{
struct p *p1 = calloc(1, sizeof(struct p));
p1->x = 1;
p1->next = calloc(1, sizeof(struct p));
printf("%d\n", p1->next->x);
return 0;
}Select an option to see the answer and solution.
Q218
Open questionSelect an option to see the answer and solution.
Q219
Open questionSelect an option to see the answer and solution.
Q220
Open questionSelect an option to see the answer and solution.