Cpp Programming 1

COEP
Lets Crack Online Exam

IT Interview Exam Questions: Cpp Programming 1 (IT Interview Exam Question, IT Campus Placement)

Subject: Cpp Programming 1

Part 1: List for questions and answers of C ++ Language

 

Q1. how many types of expression in c++

a) 5

b) 6

c) 7

d) 8

 

Q2. Do-while is an …… loop

a) Entry control

b) Exit control

c) Entry enrolled

d) None of these

 

Q3. Dragons have wings like a bird and scales like a lizard. In object oriented verabage, we would say this is an example of ?

a) Multilevel Inheritance

b) Polymorphism

c) Multiple inheritance

d) Aggregation

 

Q4. C++ was originally developed by ?

a) Colcksin and Mellish

b) Donald E.Knuth

c) Sir Richard Handlee

d) Bajarne Stoustrup

 

Q5. cfront ?

a) is the front end of C compiler

b) is the pre-processor of C compiler

c) is a tool that translate a C++ code to its equivalent C code

d) None of above

 

Q6. Which of the following is false about object oriented ?

a) is block structured language

b) is not a block structured language

c) aids in object oriented programming

d) is an extension of C 

 

Q7. Polymorphism is implemented through which mechanism in C++ ?

a) Late Interpretation

b) Late Binding

c) Early Binding

d) Overloading

 

Q8. Re-usability is a desirable feature of a language as it is ?

a) Decreases the testing time

b) Lowers the maintenance cost

c) Reduce the compilation time

d) Reduces the exectution time

 

Q9. Which of the following is not an extension associated during the creation of a C++ program?

a) .cpp

b) .exe

c) .jpg

d) .bak

 

Q10. Which of the following is not a C++ Compiler ?

a) C front

b) Turbo C++

c) Borland C++

d) C++ compiler

 

Q11. Why every program begins with main () in C++ ?

a) As this is from the compiler knows that program execution actually starts

b) Because its name is main

c) Both A and B

d) None of above

 

Q12. The wrapping up of data and functions into a single unit is called ?

a) Inheritance

b) Polymorphism

c) Encapsulation

d) Overloading 

 

Q13. The process by which objects of one class acquire the attributes of another class is known as…………?

a) Inheritance

b) Polymorphism

c) Data Abstraction

d) Binding

 

Q14. ………. means the ability that one thing can take several distinct forms ?

a) Dynamic Binding

b) Early Binding

c) Polymorphism

d) None of above

 

Q15. The technique by which objects communicate with each other is called ?

a) information passing

b) function passing

c) message passing

d) none of above

 

Q16. Which operator is used to define a member of a class from outside the class definition

a) scope resolution

b) ->

c) Dot

d) None of these

 

Q17. Which of the following cannot be declared static?

a) Class

b) Object

c) Functions

d) Both (a) and (b)

 

Q18. Forgetting to include a file (like cmath or math.h) that is necessary will result in

a) compilation error

b) warning when the program is run

c) error at link time

d) warning when the program is compiled 

 

Q19. Which of the following comments about inline comments are true?

a) A function is declared inline by typing the keyword inline before the return value of the function

b) A function is declared inline by typing the keyword inline after the return value of the function

c) A function that is declared inline may not be treated inline

d) Both (a) and (c)

 

Q20. At what point of time a variable comes into existence in memory is determined by its

a) scope

b) storage class

c) data type

d) all of the above 

 

Part 1: List for questions and answers of C ++ Language

 

Q1. Answer: c

 

Q2. Answer: b

 

Q3. Answer: c

 

Q4. Answer: d

 

Q5. Answer: c

 

Q6. Answer: a

 

Q7. Answer: c

 

Q8. Answer: b

 

Q9. Answer: c

 

Q10. Answer: d

 

Q11. Answer: a

 

Q12. Answer: c

 

Q13. Answer: a

 

Q14. Answer: c

 

Q15. Answer: b

 

Q16. Answer: a

 

Q17. Answer: d

 

Q18. Answer: c

 

Q19. Answer: d

 

Q20. Answer: b