Library Functions

6

Data written into a file using fwrite() can be read back using fscanf()

A. True
B. False

7

ftell() returns the current position of the pointer in a file stream.

A. True
B. False

8

FILE is a structure suitably typedef'd in "stdio.h".

A. True
B. False

9

It is necessary that for the string functions to work safely the strings must be terminated with ''.

A. True
B. False

10

What will be the output of the program?

#include<stdio.h>

int main()
{
    int i;
    char c;
    for(i=1; i<=5; i++)
    {
        scanf("%c", &c); /* given input is 'a' */
        printf("%c", c);
        ungetc(c, stdin);
    }
    return 0;
}
A. aaaa
B. aaaaa
C. Garbage value.
D. Error in ungetc statement.