Basic C Programming MCQ Questions and Answers

Practice Mode
Showing 10 of 198 questions
Q151
How many bits are absolutely necessary to store an ASCII character ?
  • A 7
  • B 8
  • C 16
  • D 15
Answer: Option A
Q152
If 7 bits are used to store a character, the percentage refuction of needed storage will be
  • A 22.5
  • B 2.5
  • C 8
  • D 12.5
Answer: Option D
Q153
Bit field
  • A is a field having many sub-fields
  • B is a structure declaring the sizes of the members in terms of bits
  • C is a member of a structure whose size is specified in terms of bits
  • D none of the above
Answer: Option C
Q154
Choose the correct comments. in a bit-field
  • A a field can be un-named
  • B a field can be of width 0
  • C if a field is un-named, its width must not be zero
  • D a field must have a name
Answer: Option
Q155
The declaration int x : 4; means
  • A x is a four digit integer
  • B x cannot be greater than a four digit integer
  • C x is a four-bit ionteger
  • D none of the above
Answer: Option C
Q156
Bit-fields will be accommodated in a word
  • A from left to right
  • B from right to left
  • C in a way that depends on the implementation
  • D none of the above
Answer: Option C
Q157
In the previous question, information about d will be in the
  • A first word
  • B second word
  • C in both words
  • D none of the above
Answer: Option B
Q158
If the declaration unsigned c:5; is replaced by unsigned:6; then
  • A it results in a syntax error
  • B it is meaningless
  • C the compiler will give a new name for the field, which can be used in the program
  • D none of the above
Answer: Option D
Q159
The above declaration is
  • A syntactically correct
  • B semantically correct
  • C a misuse of bit-fields
  • D none of the above
Answer: Option
Q160
Which of the following is not a low-level feature of C?
  • A Register storage class
  • B Bit-fields
  • C takes care of include files
  • D acts before compilation
Answer: Option D
Questions and Answers for Competitive Exams Various Entrance Test