1. What does the following C code snippet mean?
int ungetc(int c, FILE *stream)
int ungetc(int c, FILE *stream)
2. Which is the best way to generate numbers between 0 to 99?
3. Which of the following is an invalid method for input?
4. What error will be generated on using incorrect specifier for the datatype being read?
5. In C language, FILE is of which data type?
6. Which types of input are accepted in toupper(c)?
7. Which among the following is correct function call for rand() and random()?
8. what is the return value of fputs()?
9. What will be the output of the following C code?
#include <stdio.h>
#include <stdarg.h>
int f(char c, ...);
int main()
{
char c = 97, d = 98;
f(c, d);
return 0;
}
int f(char c, ...)
{
va_list li;
va_start(li, c);
char d = va_arg(li, int);
printf("%c\n", d);
va_end(li);
}
#include <stdio.h>
#include <stdarg.h>
int f(char c, ...);
int main()
{
char c = 97, d = 98;
f(c, d);
return 0;
}
int f(char c, ...)
{
va_list li;
va_start(li, c);
char d = va_arg(li, int);
printf("%c\n", d);
va_end(li);
}
10. What will be the output of the following C statement?
int sscanf(char *string, char *format, arg1, arg2, ...)
int sscanf(char *string, char *format, arg1, arg2, ...)
Read More Section(File Input Output)
Each Section contains maximum 100 MCQs question on File Input Output. To get more questions visit other sections.