12th Class Class Computer Mcqs Chapter No 9 | 2nd Year Computer Mcqs Chapter Wise Pdf
Chapter No 9
Element Of C
1. Variables are created in choose which one is correct:
- RAM
- ROM
- HARD DISK
- CACHE
2. Which of the following is a valid character constant choose which one is correct?
- A
- “b”
- ‘6’
- =
3. Which of the data type offers the highest precision choose which one is correct?
- float
- long int
- long double
- unsigned long int
4. When the result of the computation of two very small numbers is too small to be represented, this phenomenon is called choose which one is correct:
- Arithmetic overflow
- Arithmetic underflow
- Truncation
- Round off
5. The predefined words of the programming language that are used for special purposes in the source program are called choose which one is correct:
- Keywords
- Statements
- Special words
- Alphabet
6. How many keywords are in C choose which one is correct?
- 50
- 100
- 32
- 25
7. A quantity whose value may change during execution of program is called choose which one is correct:
- Constant
- string constant
- variable
- token
8. A quantity whose value cannot change during execution of program is called choose which one is correct:
- constant
- keyword
- variable
- token
9. is not a valid variable name choose which one is correct:
- 6_XYZ
- roll_no
- XYZ
- ABC
10. The symbol = represents choose which one is correct:
- Comparison operator
- Assignment operator
- Equal to operator
- None of these
11. Which of the operator has lowest precedence
- !
- +
- =
- = =
12. Relational operators are used to
- Establish a relationship among variables.
- Compare two values.
- Construct compound conditions.
- Perform arithmetic operations.
13. is valid variable name choose which one is correct:
- 2S
- 2 – S
- S – 2
- S2
14. Which of the following characters cannot be used as first character of a variable name choose which one is correct?
- 5
- x
- a
- z
15. In C, the maximum length of variable name is choose which one is correct:
- 25
- 256
- 31
- 15
16. C is a strongly typed language, this means that choose which one is correct:
- Every program must be compiled before execution
- Every variable must be declared before it is being used
- The variable declaration also defines the variable
- Sufficient data types are available to manipulate each type of data
17. The logical not (!) operator is denoted as choose which one is correct:
- Ternary operator
- Unary operator
- Binary operator
- Bitwise operator
18. a += b is equivalent to
- b += a
- a =+ b
- a = a + b
- b = b + a
19. The words used to write the statements of a program are called
- Special Words
- Words
- Keywords
- Alphabets
20. elements of program in not token choose which one is correct:
- keyword
- string constant
- variable
- comment
21. In C, the comments are written in program between choose which one is correct:
- { }
- /* */
- |* *|
- < >
22. is used to declare a real type variable choose which one is correct:
- int
- float
- long
- char
23. data types takes only one byte is memory choose which one is correct:
- int
- float
- long
- char
24. An identifier whose value can be changed during execution of a program is called
- Token
- string constant
- constant
- variable
25. Which of the following is not a valid variable name choose which one is correct?
- 3_a
- c_a
- Int1
- abc
26. Which character cannot be used in a variable name choose which one is correct?
- _
- ,
- a
- c
27. How many bytes, the double data type variable takes in memory choose which one is correct?
- 1
- 2
- 4
- 8
28. How many bytes the long data type variable takes in memory choose which one is correct?
- 1
- 2
- 4
- 8
29. In number 0.123 ⋅ 106, the precision is choose which one is correct:
- 0
- 3
- 6
- 5
30. The float data type variable has a precision of choose which one is correct:
- 15
- 6
- 3
- 5
31. The double data type variable has precision of choose which one is correct:
- 15
- 6
- 3
- 5
32. The float data type variable has a range of choose which one is correct:
- 10−30 to 1030
- 10−300 to 10300
- 10−38 to 1038
- 10−308 to 10308
33. The double data type variable has a range of choose which one is correct:
- 10−30 to 1030
- 10−300 to 10300
- 10−38 to 1038
- 10−308 to 10308
34. Which of the following is used to declare a real type variable choose which one is correct?
- long
- real
- Float
- cha
35. How many bytes the int data type takes in memory
- 1
- 2
- 4
- 8
36. is arithmetic operator choose which one is correct:
- =
- = =
- %
- &&
37. is valid character constant choose which one is correct:
- a
- “a”
- ‘a’
- None
38. is increment operator choose which one is correct:
- +
- =+
- ++
- —
39. is a modulus operator choose which one is correct:
- !
- %
- ++
- /
40. If a = 19, then after execution of the statement b = a %5; the value of b will be choose which one is correct:
- 5
- 4
- 2.71
- 2
41. The value returned by expression 3+3*5 will be choose which one is correct:
- 16
- 18
- 12
- 8
42. How many bytes the float data type takes in memory
- 1
- 2
- 4
- 8
43. How many bytes the char data type takes in memory
- 1
- 2
- 4
- 8
44. Which of the following is an arithmetic expression choose which one is correct?
- ab&&cd
- ab+cd
- !ab
- ab>cd
45. data type offers the highest precision choose which one is correct:
- float
- long int
- long double
- long float
46. How many logical operators are in C choose which one is correct?
- 4
- 3
- 2
- 6
47. is arithmetic expression choose which one is correct:
- a && b
- a + b
- !a
- a > b
48. +,-,/,% and * are choose which one is correct:
- Relational operators
- Logical operators
- Arithmetic operators
- None
49. If x = 3, then after executing the statement “x = x − −;”, the value of x will be choose which one is correct:
- 2
- 3
- 1
- 4
50. If simple assignment statement is “x = x + 2;”, then its equivalent compound assignment statement is choose which one is correct:
- x ++ = 2
- x + = 2;
- x = + 2;
- y = x + 2;
51. The value of 15%2 is
- 7
- 7.5
- 2
- 1
52. What will be the value of ‘x’ after executing the following statements choose which one is correct?
float y = 6.59;
int x = 2;
x = y;
- 2
- 6.59
- 6
- 7
53. What will be the value of ‘x’ after executing the following statements choose which one is correct?
int x = 2;
x + = x ++;
- 4
- 5
- 3
- 6
54. The names used to represent variables, constants , types functions etc are called
- Words
- Characters
- Identifiers
- All of Above
55. There are ____ types of identifiers in C language
- 2
- 3
- 4
- 1
56. Which one is not an example of standard identifier
- Printf
- if
- Sqroot
- else
57. The reserve words cannot be
- Used in program
- Redefined
- Copied
- All of Above
58. Initialization of a variable refers to
- Value at the time of declaration
- Value at any time with in the program
- Value after the program execution
- All of Above
59. What will be the value of ‘y’ after executing the following statements choose which one is correct?
int y = 3
y = y + (++y);
- 8
- 7
- 4
- 6
60. is not a valid variable name choose which one is correct:
- a123
- my name
- real
- float
61. data types is used to store real value choose which one is correct:
- float
- double
- long double
- All
62. Which of the following data can be stored by “int” type variable choose which one is correct?
- “2564”
- -56.25
- 87596
- None
63. statements is not valid choose which one is correct:
- char char = ‘a’;
- char ch = ‘a’;
- char ch = ‘9’;
- char ch = ‘A’;
64. statements is valid for declaring variable(s) choose which one is correct:
- float height;
- int x, y, z;
- double marks, total;
- All
65. Assigning a value to a variable at the time of its declaration is called choose which one is correct:
- Initializing
- Assigning
- Declaring
- Naming
66. Which one is a valid variable name
- @home
- #home
- _home
- home+
67. A variable can be declared for ____ data type
- One
- Two
- Three
- Multiple
68. statement is valid for initializing variable(s) choose which one is correct:
- float height = 5.5;
- int x = 2, y = 5, z = 6;
- char ch = ‘D’;
- All
69. is valid character constant choose which one is correct:
- ‘A’
- ‘6’
- ‘$’
- All
70. The ‘int’ data type variable has a range of choose which one is correct:
- -32768 to +32767
- 0 to 256
- 0 to 65536
- None
71. An expression may consist of choose which one is correct:
- operands
- operators
- Both (a) and (b)
- None
72. An arithmetic expression may consist of choose which one is correct:
- variables
- constants
- arithmetic operators
- All
73. is not an arithmetic operator choose which one is correct:
- +
- /
- ⋅
- %
74. The value of expression 2%3 is choose which one is correct:
- 2
- 3
- 0
- None
75. _________ defines a set of values and a set of operations on those values
- Data
- Constant
- Data Type
- None of Above
76. The predefined data types of C language are called
- User defined data types
- Standard data types
- Normal data types
- None of Above
77. Which one is not an example of standard data type of C language
- Int
- float
- Char
- real
78. Which range refers to unsigned int data type of C language
- 0 to 32768
- 0 to 32767
- 0 to 65536
- 0 to 255
79. The value of expression 11%3 is choose which one is correct:
- 2
- 3
- 3,66
- None
80. The value of expression 11%3*5 is choose which one is correct:
- 2
- 10
- 15
- None
81. valid assignment statement choose which one is correct:
- x = 10;
- x = x+y*3;
- x = y;
- All
82. is valid statement to add 1 to variable x choose which one is correct:
- x++;
- x = x +1
- x + = 1;
- All
83. Which range refers to signed int data type of C language
- -32768 to 32767
- 0 to 32767
- 0 to 65536
- 0 to 255
84. Long double data type of C language requires ____ bytes of memory
- 2
- 4
- 10
- 8
85. has higher order of precedence choose which one is correct:
- +
- ( )
- *
- /
86. How many relational operators in C choose which one is correct?
- 4
- 3
- 2
- 6
87. Which of the following is relational operator choose which one is correct?
- =
- = =
- (%
- &&
88. is not relational operator choose which one is correct:
- !=
- = =
- =
- <=
89. An expression that uses relational expression is represented by choose which one is correct:
- Relational expression
- Arithmetic expression
- Logical expression
- None
90. A relational expression may return value choose which one is correct:
- True
- False
- Both a & b
- None
91. The true value return by relational expression is represented by choose which one is correct:
- 0
- 1
- Less then zero
- None
92. returns True If X =5 and Y = 10 choose which one is correct:
- X > = Y
- X >Y
- X = = Y
- X ! = Y
93. returns False if X = 5 and Y = 10 choose which one is correct:
- X < Y
- X <= Y
- X > Y
- X ! = Y
94. operators is used to join two conditions choose which one is correct:
- Relational operator
- Arithmetic operator
- Assignment operator
- Logical operator
95. is logical operator choose which one is correct:
- AND
- OR
- NOT
- All of these
96. The logical NOT operator, denoted by !, is a choose which one is correct:
- Ternary operator
- Unary operator
- Binary operator
- Bitwise operator
97. is logical operator choose which one is correct:
- =
- = =
- %
- &&
98. logical operators is unary operator choose which one is correct:
- &&
- ||
- !
- None
99. &&, || and ! are choose which one is correct:
- Relational operators
- Logical operators
- Arithmetic operators
- None
100. symbols is used for logical OR operator choose which one is correct:
- &&
- ||
- !
- |
101. symbols is used for logical AND operator choose which one is correct:
- &&
- ||
- &
- !
102. symbols is used for logical NOT operator choose which one is correct:
- &&
- ||
- !
- None
103. is equivalent to !(p>=q) choose which one is correct:
- p=q
- p<q
- p>q
- !p<q
104. not a logical operator choose which one is correct:
- ||
- !
- &&
- >
105. returns True if X = 2 and Y =3 choose which one is correct:
- !(X >Y)
- (X > Y) || (Y > 2)
- (X < Y) && (X>=2)
- All of these
106. returns Falst if X = 2 and Y = 3 choose which one is correct:
(a) (X = = Y) || (Y > X )
(b) (X = = 2) && (Y > 2)
(c) (X < Y) && (X > 2)
(d) !(Y >3)
107. is not a logical operator choose which one is correct:
- | |
- &&
- ! =
- !