Basic C Programming MCQ

Basic C Programming MCQ
171. If the word size is 16 bit, then ~0xc5 will be
  • 0x3a
  • 0xff3a
  • 0x5c
  • none of the above
Show Answer
172. Preprocessing is typically done
  • either before or at the beginning of the compilation process
  • after compilation but before execution
  • after loading
  • none of the above
Show Answer
173. Which of the following comments about the preprocessor directive # are correct ?
  • It converts the formal argument in the macro definition into a string.
  • It strips out redundant blanks
  • It concatenates adjacent strings, if any.
  • None of the above
Show Answer
174. The scope of a macro definition
  • cannot be beyond the file in which it is defined
  • may be part of a file
  • is the entire program
  • excludes string of characters within double quotes
Show Answer
175. Thu number of possible values of m, such that m & 0x3f equals 0x23 is
  • 1
  • 2
  • 3
  • 4
Show Answer
176. As soon as a pointer variable is freed, its value
  • is set to null
  • becomes unpredictable
  • is set to 1
  • remains the same
Show Answer
177. calloc(m , n); is equivalent to
  • malloc(m *n, 0);
  • memset(0, m*n);
  • ptr = malloc(m*n); memset(p. o, m*n);
  • ptr = malloc(m*n); strcpy(p, u);
Show Answer
178. Which of the following comments are correct when a marco definition includes argumentsd ?
  • The opening parenthesis should immediately follow the macro name.
  • There should be at least one blank between the macro name and the opening parenthesis
  • There should be only one blank between the marco name and the opening parenthesis.
  • All the above comments are correct.
Show Answer
179. Choose the correct statements.
  • ' x ' is same as " x "
  • Lengthf of the string " x " is two
  • Unless otherwise specified, the first name in an enum has the value 1.
  • None of the above
Show Answer
180. Choose the correct statements.
  • enum variables can be assigned new values.
  • enum variables can be eompared.
  • Enumeration feature does not increase the power of C.
  • Use of enumeration enhances the logical clarity of a program.
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test