C Quiz interview questions
134 questions. Tap “Show answer” to check yourself.
-
The index value for an element in an array is indicated within _____ brackets.
- /*
- ()
- []
- {}
Show answer
C. []
-
How many bits are used to store data starting from right extreme?
- 15
- 16
- 32
- 64
Show answer
A. 15
-
Static and Register variables are automatically initialized to _____ value when they are declared.
- 0
- 1
- 2
- 3
Show answer
A. 0
-
The long int, signed long int has _____ bytes.
- 2
- 3
- 4
- 8
Show answer
C. 4
-
What is the range for char data type in C++?
- -126 to 127
- -127 to 128
- 128 to -127
- -128 to 127
Show answer
D. -128 to 127
-
What is the prefix character used to represent escape sequence?
- - =
- +
- *
- /
Show answer
D. /
-
The _____ symbol is used to declare a pointer variable.
- #
- /
- &
- *
Show answer
D. *
-
The operator _____ is called the insertion operator or put to operator.
- >
- >>
-
The number of elements in a 2 dimensional array is determined by multiplying the number of _____ with number of _____
- row, columns
- row, row
- columns, columns
- rows, columns
Show answer
D. rows, columns
-
_____ creates branches for multiple alternatives section of code, depending on the value of a single variable.
- while
- for
- if
- switch
Show answer
D. switch
-
_____ punctuator is used to treat statements as comments.
- /
- //
- +
- *
Show answer
B. //
-
The minimum value stored in an integer variable is
- 32780
- -32767
- 32769
- -32768
Show answer
D. -32768
- Advertisement
-
The pointer data type address of _____ operator is used.
- &
- #
- /
- *
Show answer
A. &
-
The unsigned char, and char data types has _____ bits.
- 8
- 16
- 32
- 64
Show answer
A. 8
-
The modifier _____ instructs the compiler to store the variable in the CPU register to optimize access.
- register
- static
- extern
- auto
Show answer
A. register
-
_____ data type is further divided into float and double.
- double
- float
- char
- int
Show answer
B. float
-
In _____ method, the called function arguments formal parameters become alias to the actual parameters in the calling function.
- return
- call
- call by value
- call by reference
Show answer
D. call by reference
-
The declaration statement char *cp, is a _____ type pointer.
- double
- string
- character
- integer
Show answer
C. character
-
The base data type should be prefixed with the _____ at the time of declaring a variable.
- dimension
- variable
- constant
- modifiers
Show answer
D. modifiers
-
In C++ int data type has the range of values
- 32767 to 32768
- 32768 to 32769
- -32768 to 32767
- -32768 to 32768
Show answer
C. -32768 to 32767
-
What are the equality operators?
- ==
- ! =
- both a and b
Show answer
D. both a and b
-
Integral is the _____ data type.
- float
- double
- integer
- char
Show answer
C. integer
-
When elements are stored column-wise manner it is called as _______ order.
- row
- column
- row-major
- column-major
Show answer
D. column-major
-
When the modifier unsigned is used the integer data type will store only _____ values, the sign bit is also used to store data.
- one
- two
- positive
- negative
Show answer
C. positive
- Advertisement
-
_____ bit is also called as the most significant bit or sign bit.
- 15th
- 16th
- 17th
- 18th
Show answer
B. 16th
-
The default return data type of a function, if no data type is explicitly mentioned is
- double
- float
- char
- int
Show answer
D. int
-
The maximum value stored in an integer variable is
- 32768
- -32768
- 32767
- 32780
Show answer
C. 32767
-
The range to store integer data goes upto
- 213
- 214
- 215
- 216
Show answer
D. 216
-
_____ data type that can hold both character data and the integer data.
- double
- float
- char
- int
Show answer
C. char
-
_____ data type enables to invent his own data type and define values.
- Integral
- Floating
- Derived
- User defined
Show answer
D. User defined