Practice paper –II (Half yearly) class XI (70 marks)
Q1- What is difference between analog & digital computer with example?
Q2- The control unit of the computer-
(i) Performs logical operations on the data.
(ii) Manually operates the computer.
(iii) Directs the other unit of the computer.
(iv) All the above.
Q3- Write the no. of bits in each of the following-
(i) Nibble (ii) Byte (iii) Kilobyte (iv) Megabyte.
2
1
2
Q4- What is binary language often termed as machine language? Why is machine language required? 2
Q5- Convert the following according to the given instructions- 2
(a) (1A)
16
= ( ? )
10
(b) (22.25)
10
= ( ? )
2
Q6- What is Unicode?
Q7- What is Robustness?
Q8- True or False-
(a) Similar looking names enhance the readability of the program.
(b) Programming tricks make the program more efficient.
1
1
2
(c) Statements should be indented to highlight nesting of groups of control statement.
(d) Self documenting code is a characteristic of a good program.
Q9- What do you understand by Self documenting code. Give some examples.
Q10- What are main error types? Explain briefly. Which type is most dangerous and why?
Q 11. What is role of comment and indentation in a program?
Q12. What do you mean by running and debugging a program?
(2)
(2)
Q13. Write an algorithm to print the Fibonacci series (0 1 1 2 3 5 8 …… up to n terms). (4)
Q14 What is a logical operator? Give an example. (3)
Q15 What is explicit typecasting? Write any example of explicit typecasting.
Q16. Find out the output of following code segment.
i. int a =10, b=20,c=5;
cout<<((a>b)?c:--b);
ii int a =75;
(2)
(2) cout<<((++a)+a);
Q17 Give some main features of Object oriented programming languag
Q18. What will be the output of the expression (y-x)<500?150:50 if
i. x=300, y=700
ii. x=700, y=800
Q19. What is the difference between unary and binary operators? Give their example.
Q20 What is data abstraction?
(3)
(2)
(2)
(2)
Q21. Write four rules for declaring variables?
Q22. Name the four basic types of constants in C++.
(2)
(2)
Q23. What is the difference between a keyword and an identifier? (2)
Q 24.Write floor () function with example. (2)
Q25. Find the output of following code. (2) cout<< n++ << --n << ++n;
If initially n =7?
Q26. What is the difference between explicit and implicit type conversion? (2)
Q27. What will be the output of following code fragment if the input is. (3)
1.
a
2.
c
2
3
3.
d
4.
h
5.
b cin>>ch switch(ch)
{ case ‘a’: cout<< “It is a\n”; case ‘b’: cout<< “It is b\n”; case ‘c’: cout<< “It is c\n”; break; case ‘d’: cout<< “It is d\n”; break; default: cout<< “Not a, b, c, d\n”;
}
Q28. Write a C++ program to do the following: (3) a.
Read an integer X b.
Form an integer Y by reversing the digits of X and integer S having sum of digits of
X c.
Output Y and S
Q29. Write a C++ program to accept the age of N employees and count the number of persons in the following age group: (3) a.
26-35 b.
36-45 c.
46-55
Q30. Write C++ program to print the following figure: (3)
1
1 2
1
1
1
2
2
2
3
3
3
4
4 5
Q31. Write a C++ program that inputs a character and convert it into its opposite case. (3)
Q32.Write a function Double() that takes an int argument and doubles it. The functions do not return a value.(3)
Q33. Write a program that call the function compChar() that takes two char arguments and returns 0 if both the arguments are equal. The function returns -1 if the first argument is smaller than the second and 1 if the second argument is smaller than the first. (3)
Q34. In the following program , the value of N given by the user is 20, what maximum and
2 minimum values the program could possibly display?
# include <iostream.h>
# include <stdlib.h> void main()
{ int N,Guessnum; randomize(); cin >>N;
Guessnum=random(N-10)+10; cout << Guessnum << endl;
}
Q16. ans i. 19
ii. 152 (++ has higher precedence over + that’s why 76+76=152)
Q25.ans
778
Q34.
Ans minimum – 10
maximum -19