Вы находитесь на странице: 1из 3

APTECH COMPUTER EDUCATION

Subject: Marks: 30
Date: Time: 45
Name: Batch: 9.00 to 10.30AM

Fill in the Blanks: 10X1=10M

1. Combining data and functions together as a single entity is called .


2. In structures all functions and data, by default, are but in class.
3. operator is used to read the values in C++.
4. The process of creating a new class from an existing class in known as .
5. In c++ language, three types of access specifiers are ,
and .
6. is a method is used to define a same function with different argument
list and different data type.
7. The function name is same as the class name is known as .
8. Changing the class from one form to another form is called as .
9. Maintaining the Errors by using the concept.
10. The instance of class is known as .

Choose the correct answers: 20X1=20M


Q1. The first fully Object-oriented language is ( )
a. Java
b. C++
c. Simula
d. None of the Above
Q2. Which of the looping structure in C++ check condition at the beginning of loop? ( )
a. do-while
b. while
c. Both A and B
d. None of the Above
Q3. The variables that can be used only within the function in which it is declared is called as
( )
a. Global Variables
b. Local Variables
c. Both A and B
d. None of the Above
Q4. Objects have ( )
a. behavior
b. state
c. Both A and B
d. None of the Above
Q5. If a function in C++ does not return a value then its return type is denoted as ( )
a. float
b. void
c. int
d. None of the Above
Q6. Which of the following operators cannot be overloaded? ( )
a. sizeof
b. ::
c. :?
d. All the Above
Q7. Which of the following denotes feature of OOPS? ( )
a. Inheritance
b. Encapsulation
c. Polymorphism
d. All the Above
Q8. In Late binding the function calls gets resolved during ( )
a. Compile Time
b. Run Time
c. Both A and B
d. None of the Above
Q9. The notation used for representing destructor in C++ program is ( )
a. !
b. &
c. *
d. ~
Q10. void main(){
int i;
for(i=1;i<4,i++)
switch(i)
case 1: printf("%d",i);break;
{
case 2:printf("%d",i);break;
case 3:printf("%d",i);break;
}
switch(i) case 4:printf("%d",i);
} ( )
a. 1,2,3,4
b. 1,4
c. error
d. 1,4,2,3
Q11. What's wrong? for (int k = 2, k <=12, k++) ( )
a. the increment should always be ++k;
b. the variable must always be the letter i when using a for loop
c. there should be a semicolon at the end of the statement
d. the commas should be semicolons
Q12. Which of the following denote types of polymorphism in C++? ( )
a. Virtual function
b. Function overloading
c. Operator Overloading
d. All the Above
Q13. Which of the following denote incorrect data type in C++? ( )
a. real
b. double
c. float
d. int
Q14. Which of the following is an error statement in C++ array declaration? ( )
a. int exforsys[5];
b. float exforsys[5][5];
c. int exforsys(10);
d. None of the Above
Q15. Index of an array starts from ( )
a. One
b. Zero
c. Two
d. None of the Above
Q16. What is the value of variable z when the following program segment ends? int z;
for(z=0; z<50; z++) {} ( )
a. 51
b. 49
c. 0
d. 50
Q17. The header file that must be included while using cout function in a C++ program is( )
a. conio.h
b. math.h
c. iostream.h
d. None of the Above
Q18. Which of the following denote newline character in C++ program? ( )
a. '\n'
b. '/n'
c. 'nc'
d. '/nc'
Q19. Which of the following denote advantages of inheritance? ( )
a. saves program development time
b. code reusability
c. Both A and B
d. All the Above
Q20. What is the output of following program? ( )
#include<iostream.h>
#include<conio.h>
Int main ()
{
Int a=10;
Cout<<++a++;
}
a. 11
b. 10
c. Error
d. Not defined

Вам также может понравиться