ExamVeda
Login
Home
91
What will be the output of the following C code?
#include <stdio.h>
int main()
{
    srand(time(NULL));
    printf("%d\n", rand());
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
92
What will be the output of the following C code?
#include <stdio.h>
#include <string.h>
int main()
{
    char line[3];
    FILE *fp;
    fp = fopen("newfile.txt", "r");
    while (fgets(line, 3, fp))
    fputs(line, stdout);
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
93
What will be the output of the following C code?
char str[] = "Hello Nancy“;
printf(“\n %.7s”, str) ;
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
94
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);
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
95
What is the syntax of ungetc()?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
96
scanf() is a predefined function in. . . . . . . .header file.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board