C - Files and Preprocessors Questions and Answers

Practice Mode
Showing 10 of 96 questions
Q71
What type of call is a system () call ?
  • A A user-defined procedure, not a function call
  • B A system inline function call
  • C A standard library call
  • D An application library call
Answer: Option C
Q72
Which ANSI C standard function could be used to sort a string array ?
  • A qsort
  • B sort
  • C asort
  • D bsort
Answer: Option A
Q73
Which is the fundamental data type used to implement the enum data type ?
  • A char
  • B int
  • C float
  • D double
Answer: Option B
Q74
Which of the following function does not take variable number of arguments ?
  • A main ()
  • B printf ()
  • C scanf()
  • D sprintf()
Answer: Option A
Q75
Undefined function calls in a C program ar edetected
  • A by the preprocessor
  • B by the assembler
  • C by the linker
  • D by he operating system
Answer: Option C
Q76
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?
  • A testit (&record, * string);
  • B testit (&record, string);
  • C testit (&record, &string);
  • D testit (record, *string);
Answer: Option B
Q77
What is the output generated by the following code ? # define square (a) (a*a) printf("%d", squaare(4+5));
  • A 81
  • B 4
  • C 29
  • D none of the above
Answer: Option C
Q78
What is the output generated by the above code ?
  • A 3 2
  • B 3 1
  • C 2 1
  • D 2 2
Answer: Option C
Q79
Given the statement x =  fopen (b,c); What is b?
  • A pointer to a character array which contains the filename
  • B filename within double quotes
  • C option a or b
  • D none
Answer: Option C
Q80
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]); }
  • A myprog jan feb mar apr
  • B apr mar feb jan myprog
  • C jan feb mar apr
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test