Tuesday, January 12, 2010

c++part9

Two mark Questions

1. Turbo C++ graphics functions can be categorized as
a) text mode only b. graphics mode only c. Both text and graphics d. None

2. Which of the following are true for template classes:-
i) Use the statement “template ” before the class
ii) Use the statement “template ” before the main( )
iii) T stands for new class
iv) T is name given instead of the data type for declaring private variables of the class.
a) I, iii b. I, iv c. ii, iii d. ii, iv

3. Which of the following are advantages of “new” operator:
i) It is superior to malloc in C
ii) Its return value needs to be casted
iii) it returns a pointer to appropriate data type
a. I,ii b. I , iii c. All d. None

4. Which of the following is true for “delete” operator.
i) It deletes the pointer that points to it
ii) It does not change the address value in the pointer
iii) The address is no longer valid
iv) the memory it points to holds the same value as before.
a. ii, iii b. I, ii, iii c. All d. None

5. Which of the following is true about linked list:
i) It is a data structure
ii) Each element is said to be a node
iii) Every element (node) contains data and pointer to next location
iv) the last node pointer contains NULL
a. only ii, iii b. Only I, iv c. All d. None

6. Which of the following are advantages of using linked list
i) It can be allocated when required
ii) It has fixed memory allocation
iii) It is more flexible storage
a. I, iii b. ii. iii c. All d. iii

7. Which of the following operations can be performed with single linked list:
i) create list ii) insert iii) delete iv) change
v) move forward vi) move backward
a. I, ii, iii, v b. I, ii, iii, iv, v c. All d. None

8. Which of the following can be performed with double linked list
i) create list ii) insert iii) delete iv)change
v) move forward vi) move backward
a. I, ii, iii, v b. I, ii, iii, iv, v c. All d. None

9. Which of the following are the valid attributes for the fillstyle patterns:
i) SOLID_FILL ii) SOLID_LINE iii) SLASH_FILL iv) HATCH_FILL
v) USER_FILL vi) DOT_FILL
a. I, iii, iv, v b. I, iii, iv, v, vi c. All d. None

10. Which of the following are valid values for settextjustify vertical alignments:
i) LEFT_TEXT ii) CENTER_TEXT iii) RIGHT_TEXT
iv) BOTTOM_TEXT v) TOP_TEXT
a. I, ii, iii b. ii, iv, v c. All d. None

11. Which of the following are valid values for settextjustify horizontal alignments:
i) LEFT_TEXT ii) CENTER_TEXT iii) RIGHT_TEXT
iv) BOTTOM_TEXT v) TOP_TEXT
a. I, ii, iii b. ii, iv, v c. All d. None






two mark
1. c 11.a
2. b
3. b
4.a
5.c
6.a
7.b
8.c
9.a
10.b