12th class (Fsc) computer unit 9 MCQs
chapter 9 MCQs 12th Class Computer
Elements of “C”:
1. Which of the following is not a valid identifier?
a. My Integer
b. Return
c. Total3
d. My Int
2. Variables are created in:
a. Hard disk
b. RAM
c. Cache
d. ROM
3. Another name for keyword is:
a. Comments
b. Reserved word
c. Identifier
d. Special word
4. The total number of keywords in C is:
a. 34
b. 30
c. 36
d. 32
5. In C, the maximum length of text name is:
a. 155 character
b. 25 characters
c. 55 characters
d. 255 characters
6. A memory location with some data that can be changed is called:
a. Named constant
b. Constant
c. Variable
d. None
7. In C language, variable name(s) cannot begin with a(an):
a. Upper-case letter
b. Number
c. Lower-case letter
d. Underscore
8. Which of the following are valid variable names?
a. Long
b. Integer
c. Not Long enough
d. Both B & C
9. An integer variable can store the value:
a. 32898
b. -1.1
c. “123”
d. None
10. Which of the following is use separate each variable while declaring more than one variable on the same line?
a. Keyword
b. Variable name
c. Data type
d. Both B & C
11. Which of the following are required to declare a variable?
a. Pipes
b. Commas
c. Semicolons
d. Colons
12. Which is a valid statement for declaring a variable?
a. Double salary;
b. Int marks;
c.Int a,b,c;
d. All
13. A process of assigning initial value to a variable at the time of declaration is called:
a. Naming
b. Assigning
c. Initializing
d. None
14. Which is a valid statement for initialization of a variable?
a. Char grade=’a’;
b. Int n=100;
c. Int x=50, y=75;
d. All
15. Which is not a valid statement for initialization of a variable?
a. Char n[ ]=”hello word”;
b. Int=100;
c. Const int N=100;
d. Long population=15000
16. Which of the following statement is correct?
a. Int continue =5.0;
b. Float num1;num2;
c. String black=’white’;
d. Int day, night
17. Which statement can be used to store letter A in char variable some Char?
a. Some Char=”A”;
b. Some Char=’A’;
c. Some Char=A;
d. Both A and C
18. Another name for keywords is:
a. Comments
b. Reserved words
c. Special words
d. None
19. Which of the following is a valid C statement?
a. Car ch=97;
b. Char ch=’a’;
c. Char ch=”a”;
d. Char ch=’ab’;
20. Which of the following is an illegal variable name?
a. Day Of Week
b. _customer_num
c. 2d Graph
d. Jan2009
21. Which of the following is used to declare variable that can hold real numbers:
a. Real
b. Int
c. Float
d. None
22. Associativity is either right to left or:
a. Back to front
b. Left to right
c. Top to bottom
d. None
23. When a variable is assigned a number that is too large for its data type it:
a. Underflows
b. Overflows
c. Exceeds expectations
d. None
24. Const, double and int and examples of:
a. Compiler directives
b. Comments
c. None
d. Reserved words
25. Which of the following is a valid character constant?
a. ‘6’
b. a
c. =
d. b