Cpp Programming 13

COEP
Lets Crack Online Exam

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

Subject: Cpp Programming 13

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

 

Q1. Which operator is having right to left associativity in the following?

a) Array subscripting

b) Function call

c) Addition and subtraction

d) Type cast

 

Q2. Which operator is having the highest precedence?

a) postfix

b) unary

c) shift

d) equality

 

Q3. What is this operator called ?: ?

a) conditional

b) relational

c) casting operator

d) none of the mentioned

 

Q4. What is the use of dynamic_cast operator?

a) it converts virtual base class to derived class

b) it converts virtual base object to derived objects

c) it will convert the operator based on precedence

d) None of the mentioned

 

Q5. Pick the other name of operator function

a) function overloading

b) operator overloading

c) member overloading

d) None of the mentioned

 

Q6. Which of the following operators can’t be overloaded?

a) ::

b) +

c) –

d) [] 

 

Q7. How to declare operator function?

a) operator operator sign

b) operator

c) operator sign

d) None of the mentioned

 

Q8. How many sequence of statements are present in c++?

a) 4

b) 3

c) 5

d) 6

 

Q9. The switch statement is also called as?

a) choosing structure

b) selective structure

c) certain structure

d) none of the mentioned

 

Q10. The destination statement for the goto label is identified by what label?

a) $

b) @

c) *

d) :

 

Q11. How many types of loops are there?

a) 4

b) 2

c) 3

d) 1

 

Q12. Which of the following is correct about the statements given below?

1.All operators can be overloaded in C++.

2.We can change the basic meaning of an operator in C++

a) Only I is true

b) Both I and II are false

c) Only II is true

d) Both I and II are true 

 

Q13. Which of the following operators cannot be overloaded?

a) []

b) ?:

c) ->

d) *

 

Q14. Which of the following keyword is used to overload an operator?

a) overload

b) operator

c) friend

d) override

 

Q15. Which of the following two entities (reading from Left to Right) can be connected by the dot operator?

a) A class member and a class object

b) A class object and a class

c) A class and a member of that class

d) A class object and a member of that class

 

Q16. We can output text to an object of class ostream using the insertion operator because

a) the ostream class is a stream

b) the insertion operator works with all classes

c) we are actually outputting to cout

d) the insertion operator is overloaded in ostream

 

Q17. Which of the following statement is valid?

a) We can create new C++ operators

b) We can change the precedence of the C++ operators

c) We can change the associativity of the C++ operators

d) We can not change operator templates

 

Q18. How many sequence of statements are present in c++?

a) 4

b) 3

c) 5

d) 6 

 

Q19. The difference between x and ‘x’ is

a) The first one refers to a variable whose identifier is x and the second one refers to the character constant x

b) The first one is a character constant x and second one is the string literal x

c) Both are same

d) None of the mentioned

 

Q20. How to declare a wide character in string literal?

a) L prefix

b) l prefix

c) W prefix

d) none of the mentioned

 

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

 

Q1. Answer: d

 

Q2. Answer: a

 

Q3. Answer: a

 

Q4. Answer: a

 

Q5. Answer: b

 

Q6. Answer: a

 

Q7. Answer: a

 

Q8. Answer: c

 

Q9. Answer: b

 

Q10. Answer: d

 

Q11. Answer: a

 

Q12. Answer: b

 

Q13. Answer: b

 

Q14. Answer: b

 

Q15. Answer: d

 

Q16. Answer: d

 

Q17. Answer: d

 

Q18. Answer: c

 

Q19. Answer: a

 

Q20. Answer: a