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:

  1. RAM
  2. ROM
  3. HARD DISK
  4. CACHE

2. Which of the following is a valid character constant choose which one is correct? 

  1. A
  2. “b” 
  3. ‘6’
  4.  =

3. Which of the data type offers the highest precision choose which one is correct? 

  1. float
  2. long int 
  3. long double
  4. 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: 

  1. Arithmetic overflow
  2. Arithmetic underflow
  3. Truncation
  4. 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: 

  1. Keywords
  2. Statements
  3. Special words
  4. Alphabet 

6. How many keywords are in C choose which one is correct? 

  1. 50
  2. 100 
  3. 32
  4. 25

7. A quantity whose value may change during execution of program is called choose which one is correct:

  1. Constant
  2. string constant 
  3. variable
  4. token 

8. A quantity whose value cannot change during execution of program is called choose which one is correct:

  1. constant
  2. keyword 
  3. variable
  4. token 

9.         is not a valid variable name choose which one is correct:

  1. 6_XYZ
  2.  roll_no 
  3. XYZ
  4. ABC

10. The symbol = represents choose which one is correct:

  1. Comparison operator
  2. Assignment operator
  3. Equal to operator
  4. None of these

  •  

11. Which of the operator has lowest precedence 

  1. !
  2. +
  3. =
  4.  = =

12. Relational operators are used to

  1. Establish a relationship among variables.
  2. Compare two values. 
  3. Construct compound conditions. 
  4. Perform arithmetic operations.

13.         is valid variable name choose which one is correct:

  1. 2S
  2. 2 – S 
  3. S – 2
  4. S2

14. Which of the following characters cannot be used as first character of a variable  name choose which one is correct?

  1. 5
  2. a

15. In C, the maximum length of variable name is choose which one is correct:

  1. 25
  2. 256 
  3. 31
  4. 15 

16. C is a strongly typed language, this means that choose which one is correct: 

  1. Every program must be compiled before execution
  2. Every variable must be declared before it is being used
  3. The variable declaration also defines the variable
  4. Sufficient data types are available to manipulate each type of data

17. The logical not (!) operator is denoted as choose which one is correct: 

  1. Ternary operator
  2. Unary operator
  3. Binary operator
  4. Bitwise operator 

18. a += b is equivalent to

  1. b += a
  2.  a =+ b
  3. a = a + b
  4. b = b + a 

19. The words used to write the statements of a program are called

  1. Special Words
  2. Words 
  3. Keywords
  4. Alphabets 

20.           elements of program in not token choose which one is correct: 

  1. keyword
  2. string constant 
  3. variable
  4. comment

21. In C, the comments are written in program between choose which one is correct: 

  1. { }
  2.  /* */ 
  3. |* *|
  4. < >

22.        is used to declare a real type variable choose which one is correct:

  1. int
  2. float 
  3. long
  4. char

23.       data types takes only one byte is memory choose which one is correct: 

  1. int
  2. float
  3. long
  4. char

24. An identifier whose value can be changed during execution of a program is called

  1. Token
  2. string constant 
  3. constant
  4. variable

25. Which of the following is not a valid variable name choose which one is correct?

  1. 3_a
  2. c_a 
  3. Int1
  4. abc 

26. Which character cannot be used in a variable name choose which one is correct?

  1. _
  2.  ,
  3. a
  4. c

27. How many bytes, the double data type variable takes in memory choose which one is correct? 

  • 1
  • 4

28. How many bytes the long data type variable takes in memory choose which one is correct?

  1. 1
  2. 2
  3. 4

29. In number 0.123 106, the precision is choose which one is correct: 

  1. 0
  2. 6

30. The float data type variable has a precision of choose which one is correct:

  1. 15
  2. 3

31. The double data type variable has precision of choose which one is correct: 

  1. 15
  2. 3

32. The float data type variable has a range of choose which one is correct:

  1. 10−30 to 1030
  2. 10−300 to 10300
  3. 1038 to 1038
  4. 10−308 to 10308

33. The double data type variable has a range of choose which one is correct:

  1. 10−30 to 1030
  2. 10−300 to 10300
  3. 10−38 to 1038
  4. 10308 to 10308

34. Which of the following is used to declare a real type variable choose which one is correct?

  1. long
  2. real
  3. Float
  4. cha 

35. How many bytes the int data type takes in memory

  1. 1
  2. 2
  3. 4
  4. 8

36.        is arithmetic operator choose which one is correct:

  1. =
  2. = =
  3. %
  4. &&

37.         is valid character constant choose which one is correct:

  1. a
  2. “a”
  3. ‘a’
  4. None 

38.         is increment operator choose which one is correct:

  1. +
  2.  =+
  3. ++
  4.  —

39.         is a modulus operator choose which one is correct:

  1.  !
  2. ++
  3.  / 

40. If a = 19, then after execution of the statement b = a %5; the value of b will be choose which one is correct:

  1. 5
  2. 4
  3. 2.71

41. The value returned by expression 3+3*5 will be choose which one is correct: 

  1. 16
  2. 18 
  3. 12

42. How many bytes the float data type takes in memory

  1. 1
  2. 2
  3. 4
  4. 8

43. How many bytes the char data type takes in memory

  1. 1
  2. 2
  3. 4
  4. 8

44. Which of the following is an arithmetic expression choose which one is correct? 

  1. ab&&cd
  2. ab+cd
  3. !ab
  4.  ab>cd

45.          data type offers the highest precision choose which one is correct:

  1. float
  2. long int 
  3. long double
  4. long float 

46. How many logical operators are in C choose which one is correct?

  1. 4
  2. 2

47.         is arithmetic expression choose which one is correct:

  1. a && b
  2. a + b 
  3. !a
  4. a > b

48. +,-,/,% and * are choose which one is correct: 

  1. Relational operators
  2. Logical operators
  3. Arithmetic operators
  4. None 

49. If x = 3, then after executing the statement x = x ;, the value of x will be choose which one is correct: 

  1. 2
  2. 1

50. If simple assignment statement is “x = x + 2;”, then its equivalent compound  assignment statement is choose which one is correct:

  1. x ++ = 2
  2. x + = 2; 
  3. x = + 2;
  4. y = x + 2;

51. The value of 15%2 is 

  1. 7
  2. 7.5 
  3. 2
  4. 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;

  1. 2
  2. 6.59 
  3. 6

53. What will be the value of ‘x’ after executing the following statements choose which one is correct? 

int x = 2; 

 x + = x ++;

  1. 4
  2. 3
  3.  6 

54. The names used to represent variables, constants , types functions etc are called

  1. Words
  2. Characters
  3. Identifiers
  4. All of Above 

55. There are ____ types of identifiers in C language 

  1. 2
  2. 3
  3. 4
  4. 1

56. Which one is not an example of standard identifier 

  1. Printf
  2.  if
  3. Sqroot
  4. else 

57. The reserve words cannot be 

  1. Used in program
  2. Redefined
  3. Copied
  4. All of Above 

58. Initialization of a variable refers to 

  1. Value at the time of declaration
  2. Value at any time with in the program
  3. Value after the program execution
  4. 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);

  1. 8
  2. 7  
  3. 4
  4. 6

60.         is not a valid variable name choose which one is correct:

  1. a123
  2.  my name
  3. real
  4. float 

61.         data types is used to store real value choose which one is correct:

  1. float
  2. double 
  3. long double
  4. All

62. Which of the following data can be stored by “int” type variable choose which one is correct?

  1. “2564”
  2.  -56.25 
  3. 87596
  4. None

63.        statements is not valid choose which one is correct:

  1. char char = ‘a’;
  2. char ch = ‘a’;
  3. char ch = ‘9’;
  4. char ch = ‘A’;

64.       statements is valid for declaring variable(s) choose which one is correct:

  1.  float height;
  2. int x, y, z; 
  3. double marks, total;
  4. All

65. Assigning a value to a variable at the time of its declaration is called choose which one is correct:

  1. Initializing
  2. Assigning
  3. Declaring
  4. Naming

66. Which one is a valid variable name 

  1. @home
  2. #home 
  3. _home
  4. home+ 

67. A variable can be declared for ____ data type 

  1. One
  2. Two
  3. Three
  4. Multiple

68.        statement is valid for initializing variable(s) choose which one is correct:

  1. float height = 5.5;
  2. int x = 2, y = 5, z = 6; 
  3. char ch = ‘D’;
  4. All

69.         is valid character constant choose which one is correct:

  1. ‘A’
  2. ‘6’
  3. ‘$’
  4. All

70. The ‘int’ data type variable has a range of choose which one is correct:

  1. -32768 to +32767
  2. 0 to 256 
  3. 0 to 65536
  4. None 

71. An expression may consist of choose which one is correct: 

  1. operands
  2. operators 
  3. Both (a) and (b)
  4. None 

72. An arithmetic expression may consist of choose which one is correct:

  1. variables
  2. constants 
  3. arithmetic operators
  4. All

73.        is not an arithmetic operator choose which one is correct:

  1. +
  2.  / 

74. The value of expression 2%3 is choose which one is correct: 

  1. 2
  2. 0
  3. None 

75. _________ defines a set of values and a set of operations on those values

  1. Data
  2. Constant 
  3. Data Type
  4. None of Above 

76. The predefined data types of C language are called 

  1. User defined data types
  2. Standard data types
  3. Normal data types
  4. None of Above 

77. Which one is not an example of standard data type of C language 

  1.  Int
  2. float
  3. Char
  4. real

78. Which range refers to unsigned int data type of C language 

  1. 0 to 32768
  2. 0 to 32767 
  3. 0 to 65536
  4. 0 to 255 

79. The value of expression 11%3 is choose which one is correct: 

  1. 2
  2. 3,66
  3. None

80. The value of expression 11%3*5 is choose which one is correct: 

  1. 2
  2. 10 
  3. 15
  4. None 

81.          valid assignment statement choose which one is correct:

  1. x = 10;
  2. x = x+y*3;
  3. x = y;
  4. All

82.          is valid statement to add 1 to variable x choose which one is correct:

  1. x++;
  2. x = x +1
  3. x + = 1;
  4. All

83. Which range refers to signed int data type of C language 

  1. -32768 to 32767
  2. 0 to 32767 
  3. 0 to 65536
  4. 0 to 255 

84. Long double data type of C language requires ____ bytes of memory

  1.  2
  2. 4
  3. 10
  4. 8

85.  has higher order of precedence choose which one is correct:

  1.  +
  2. ( )
  3. *
  4.  / 

86. How many relational operators in C choose which one is correct? 

  1.  4
  2.  3 
  3. 2

87. Which of the following is relational operator choose which one is correct? 

  1. =
  2.  = = 
  3. (%
  4. &&

88.         is not relational operator choose which one is correct: 

  1. !=
  2.  = =
  3. =
  4.  <=

89. An expression that uses relational expression is represented by choose which one is correct:

  1. Relational expression
  2. Arithmetic expression
  3. Logical expression
  4. None

90. A relational expression may return value choose which one is correct:

  1. True
  2. False
  3. Both a & b
  4. None 

91. The true value return by relational expression is represented by choose which one is correct:

  1.  0
  2. Less then zero
  3. None 

92.        returns True If X =5 and Y = 10 choose which one is correct: 

  1. X > = Y
  2. X >Y
  3. X = = Y
  4. X ! = Y

93.        returns False if X = 5 and Y = 10 choose which one is correct: 

  1. X < Y
  2. X <= Y
  3. X > Y
  4. X ! = Y

94.         operators is used to join two conditions choose which one is correct: 

  1. Relational operator
  2. Arithmetic operator 
  3. Assignment operator
  4. Logical operator

95.        is logical operator choose which one is correct:

  1. AND
  2. OR
  3. NOT
  4. All of these

96. The logical NOT operator, denoted by !, is a choose which one is correct: 

  1. Ternary operator
  2. Unary operator
  3. Binary operator
  4. Bitwise operator

97.        is logical operator choose which one is correct:

  1. =
  2. = =
  3. %
  4. &&

98.        logical operators is unary operator choose which one is correct:

  1. &&
  2. || 
  3. !
  4. None 

99. &&, || and ! are choose which one is correct: 

  1.  Relational operators
  2.  Logical operators
  3. Arithmetic operators
  4. None

100.         symbols is used for logical OR operator choose which one is correct:

  1. &&
  2.  || 
  3. !

101.         symbols is used for logical AND operator choose which one is correct: 

  1.  &&
  2.  ||
  3.  &
  4.  ! 

102.          symbols is used for logical NOT operator choose which one is correct: 

  1. &&
  2. || 
  3. !
  4. None 

103.         is equivalent to !(p>=q) choose which one is correct: 

  1. p=q
  2. p<q
  3. p>q
  4. !p<q

104.         not a logical operator choose which one is correct: 

  1. ||
  2.  ! 
  3. &&

105.          returns True if X = 2 and Y =3 choose which one is correct: 

  1. !(X >Y)
  2. (X > Y) || (Y > 2)
  3. (X < Y) && (X>=2)
  4.  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: 

  1. | |
  2. &&
  3. ! =