C - Files and Preprocessors Questions and Answers
C Files and Preprocessors Questions with Answers are essential for mastering file handling, macros, and directives in C programming. As part of programming questions and answers for placement exams, this topic helps students understand real-world input/output operations and code optimization techniques. Frequently asked in TCS, Wipro, and Capgemini tests, these questions assess how well you manage data files and preprocess instructions efficiently. Practicing these C programming MCQs with solutions improves your coding proficiency and exam accuracy. Access free C file handling and preprocessor aptitude questions with explanations in PDF or attempt our online mock test.
C - Files and Preprocessors
Showing 10 of
96 questions
71. What type of call is a system () call ?
- A user-defined procedure, not a function call
- A system inline function call
- A standard library call
- An application library call
72. Which ANSI C standard function could be used to sort a string array ?
- qsort
- sort
- asort
- bsort
73. Which is the fundamental data type used to implement the enum data type ?
- char
- int
- float
- double
74. Which of the following function does not take variable number of arguments ?
- main ()
- printf ()
- scanf()
- sprintf()
75. Undefined function calls in a C program ar edetected
- by the preprocessor
- by the assembler
- by the linker
- by he operating system
76. void test it (struct cust_rec *sptr, char* s) { ... } Referring to the sample code above, if a calling function has a char array variable string of length 10 and a cust_rec structure variable record, what would be the correct call to testit?
- testit (&record, * string);
- testit (&record, string);
- testit (&record, &string);
- testit (record, *string);
77. What is the output generated by the following code ? # define square (a) (a*a) printf("%d", squaare(4+5));
- 81
- 4
- 29
- none of the above
79. Given the statement x = fopen (b,c); What is b?
- pointer to a character array which contains the filename
- filename within double quotes
- option a or b
- none
80. What would be the output if the following program (nyprog.c) is run using the following command line ? nyprog jan feb mar apr main (int size, char *arg[ ] ) { while (size) printf ("%s ", arg [--size]); }
- myprog jan feb mar apr
- apr mar feb jan myprog
- jan feb mar apr