12th CLASS COMPUTER TEST#2
Name: Time: 2 hours
Roll No: Total marks: 60 , Dated: 15-01-2025
SECTION-I
Choose the correct option from the given. (14)
.
1. The expression 8/3 has a value equal to ; my aegggg
a. 1 b. 2 c. 3 d. None
2. The expression 3%5 has a value equal to:
a. 3 b. 5 c. 0 d. None
3. The value of the C expression 6 / 9 * 2 is:
a. 0.27... b. 1.33... c. 0 d. None
4. Which assignment statement could be used to store the letter A into the char variable someChar?
a. someChar = "A"; b. someChar = 'A'; c. someChar = A; d. a and c
5. Which of the following operators is used to assign a value to a variable?
a. > b. == c. = d. *
6. Which of the following is correct syntax for writing an assignment statement?
a. Variable = right_side b. Constant = right_side c. Constant = variable d. None
7. A relation expression produces results as:
a. True b. False c Either a or b d. Any value
8. What is the value of x after the following statements? float x; x=15/4;
a. 3.75 b. 4.0 c. 3.0 d. 60
9. Which of the following returns True if A = 25 and B = 15:
a. A+B b. A<=B c. A!=B d. none of above
10. For A = 4 and B = 5 which evaluates as true?
a. A<> B b. A < B c) A > B d) A >=B
11. Which of the following can be used as character constant:
a. Characters b. Digits c. Special characters d. All
12. Which of the following are valid examples of character constant?
a. ' A ' b. '9' c. '$' d. All
13. A character constant must be enclosed in:
a. Quotation marks ("). b. Single quotes ('). c. Exclamation points (!). d. Pound signs (#).
14. What is the valid range of numbers for int type of data?
a. -32767 to +32767 b. -32768 to +32767 c. 65536 to +65536 d. No specific range ,
SECTION-II
Q2: Attempt any eleven questions (Max Marks: 11x2=22)
1. Trace out errors in the following code.
x=02;
printf(‘C is a \n goo\d language’);
2. What is % operator?
3. What are Unary operators? Give example.
4. What is compound assignment operators? Give example.
5. What are user defined identifiers?
6. Why Logical operators are used?
7. What are keywords?
8. Trace the output of the following C Program:
int a=15, b;
printf(“a = %d” ,a);
9. Which problems may occur while working with floating point numbers?
10. What is the cause of an arithmetic underflow?
11. List different types of operators in C.
12. What is compound assignment statement? Give example.
13. What is arithmetic expression?
14. If a and b are integers and b = 12, what is value of a by the expression?
a = 7.8 + b / 5;
SECTION-III
Attempt any three Long Questions (Max Marks: 8x3=24)
Q#3 What is a variable? What are the rules for naming variables?
Q#4 What are logical operators? Discuss in detail.
Q#5 Discuss different problems while dealing with integer values.
Q#6 What is an Identifier? Discuss different types of Identifiers.