computer MCQs

12th • Chapter 09

50 Questions TextBook
1

The names used to represent variables, constants, types, and functions are called?

A
Keywords
B
Identifiers
C
Data Types
D
Operators
2

According to the text, how many types of identifiers are there in C?

A
One
B
Two
C
Three
D
Four
3

Which of the following is given as an example of a standard identifier?

A
int
B
main
C
printf
D
void
4

The fact that 'SQUARE_AREA' and 'Square_Area' are considered different identifiers means C is?

A
Case insensitive
B
Strongly typed
C
A magic tool
D
Case sensitive
5

Words that have a predefined meaning in C and cannot be redefined are called?

A
Identifiers
B
Comments
C
Keywords
D
Variables
6

How many words are defined as keywords in ANSI C?

A
31
B
32
C
40
D
64
7

Variables are named memory locations created in?

A
ROM
B
Hard Disk
C
Cache
D
RAM
8

What is the process of assigning a value to a variable at the time of its declaration called?

A
Defining
B
Initializing
C
Declaring
D
Executing
9

A variable name can consist of letters, digits, and which other character?

A
Hyphen (-)
B
Ampersand (&)
C
Underscore (_)
D
Space ( )
10

What must be the first character of a variable name in C?

A
A digit
B
An underscore
C
A letter
D
Any character
11

For many compilers like Turbo C++, what is the maximum number of significant characters in a variable name?

A
8
B
16
C
31
D
64
12

Which of the in the following is an invalid variable name in C?

A
interest_rate
B
totalMarks
C
problem solving
D
MAX_SPEED
13

A quantity whose value cannot be changed during program execution is a?

A
Variable
B
Constant
C
Keyword
D
Operator
14

Which directive is used to define constant macros like #define PI 3.142857?

A
include
B
define
C
constant
D
macro
15

A single alphabet, digit, or symbol enclosed in apostrophes like 'A' is a?

A
String constant
B
Numeric constant
C
Float constant
D
Character constant
16

What is the maximum length of a character constant in C?

A
1 character
B
2 characters
C
4 characters
D
8 characters
17

'int', 'double', and 'char' are examples of what?

A
User-defined data types
B
Standard data types
C
Reserved words
D
Functions
18

How many bytes of memory does a standard 'int' variable typically occupy?

A
1
B
2
C
4
D
8
19

What is the range of values for a standard 'signed int' data type?

A
0 to 255
B
0 to 65535
C
-128 to 127
D
-32768 to 32767
20

What is the range of values for an 'unsigned int' data type?

A
0 to 65535
B
-32768 to 32767
C
0 to 255
D
-2147483648 to 2147483647
21

How many bytes of memory does a 'long' data type occupy?

A
1
B
2
C
4
D
8
22

In scientific notation like 2.45634e5, the value 2.45634 is the?

A
Exponent
B
Base
C
Mantissa
D
Power
23

Which data type provides the highest precision according to the table in the text?

A
float
B
double
C
long int
D
long double
24

How many bytes of memory does a 'float' variable occupy?

A
2
B
4
C
8
D
10
25

What is the precision in digits for a 'double' data type?

A
6
B
10
C
15
D
19
26

The 'char' data type variable occupies how many bytes in memory?

A
1
B
2
C
4
D
Depends on character
27

In C, characters are stored and manipulated in the form of?

A
EBCDIC code
B
Binary code
C
Unicode
D
ASCII code
28

When the result of a computation is too large to be represented, the phenomenon is called?

A
Arithmetic underflow
B
Cancellation error
C
Arithmetic overflow
D
Syntax error
29

When a calculation result is too small to be represented accurately and is set to zero, it is called?

A
Arithmetic overflow
B
Arithmetic underflow
C
Round off error
D
Truncation
30

What is the symbol for the modulus operator in C?

A
*
B
/
C
%
D
mod
31

The operator '==' is what type of operator?

A
Assignment
B
Arithmetic
C
Relational
D
Logical
32

What does the expression 'a != b' check for?

A
a is not equal to b
B
a is less than b
C
a is greater than b
D
a equals b
33

Which operator is the logical AND?

A
|
B
&
C
||
D
&&
34

Which operator is used to reverse the result of a logical evaluation?

A
&&
B
||
C
!
D
!=
35

The '=' symbol in C represents which operator?

A
Equality
B
Relational
C
Assignment
D
Comparison
36

The '++' symbol is known as which operator?

A
Addition
B
Increment
C
Assignment
D
Compound
37

If j = 10; and the statement is i = ++j;, what will be the final value of i?

A
10
B
11
C
9
D
Undefined
38

If j = 10; and the statement is i = j++;, what will be the final value of i?

A
10
B
11
C
9
D
Undefined
39

Increment and decrement operators are what type of operators?

A
Binary
B
Ternary
C
Unary
D
Relational
40

The statement 'j -= 5;' is equivalent to which of the following?

A
j = 5 - j;
B
j = 5;
C
j = j - 5;
D
5 = j - 5;
41

Which of the following operators has the highest precedence according to the text?

A
&&
B
0
C
*
D
!
42

Which of the following operators has the lowest precedence?

A
0
B
||
C
&&
D
+
43

A combination of operators and operands is known as?

A
A function
B
A statement
C
An expression
D
A declaration
44

What is the result of the integer division 5 / 2 in C?

A
2.5
B
2
C
3
D
Error
45

What is the result of the expression 5 % 2 in C?

A
2.5
B
2
C
1
D
0
46

When a double value like 2.5 is assigned to an int variable, what happens to the fractional part?

A
It is rounded up
B
It is rounded down
C
It is truncated
D
It causes an error
47

How do you start a single-line comment in C?

A
/*
B
//
C
##
D
<!--
48

How must a multi-line comment be ended in C?

A
//
B
*/
C
/*
D
-->
49

Comments in a C program are?

A
Executed by the compiler
B
Ignored by the compiler
C
Converted to machine code
D
Used for calculation
50

The standard input/output library is represented as?

A
math.h
B
string.h
C
stdio.h
D
stdlib.h