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;
}

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);
}

35.
Select the right explanation for the following C code snippet.
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;
}

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);
}

Read More Section(File Input Output)

Each Section contains maximum 100 MCQs question on File Input Output. To get more questions visit other sections.