
IT Interview Exam Questions: Cpp Programming 9 (IT Interview Exam Question, IT Campus Placement)
Subject: Cpp Programming 9
Part 9: List for questions and answers of C ++ Language
Q1. Which of the following correctly declares an array?
a) int array[10];
b) int array;
c) array{10};
d) array array[10];
Q2. Which of the following provides a reuse mechanism?
a) Abstraction
b) Inheritance
c) Dynamic binding
d) Encapsulation
Q3. Which of the following concepts means wrapping up of data and functions together?
a) Abstraction
b) Encapsulation
c) Inheritance
d) Polymorphism
Q4. What is the index number of the last element of an array with 9 elements?
a) 9
b) 8
c) 0
d) Programmer-defined
Q5. What is a array?
a) An array is a series of elements of the same type in contiguous memory locations
b) An array is a series of element
c) An array is a series of elements of the same type placed in non-contiguous memory locations
d) None of the mentioned
Q6. Which of the following accesses the seventh element stored in array?
a) array[6];
b) array[7];
c) array(7);
d) array;
Q7. Which of the following gives the memory address of the first element in array?
a) array[0];
b) array[1];
c) array(2);
d) array;
Q8. Which of the following correctly declares an array?
a) int array[10];
b) int array;
c) array{10};
d) array array[10];
Q9. What is the index number of the last element of an array with 9 elements?
a) 9
b) 8
c) 0
d) Programmer-defined
Q10. What is a array?
a) n array is a series of elements of the same type in contiguous memory locations
b) An array is a series of element
c) An array is a series of elements of the same type placed in non-contiguous memory locations
d) None of the mentioned
Q11. Which of the following accesses the seventh element stored in array?
a) array[6];
b) array[7];
c) array(7);
d) array;
Q12. Which of the following gives the memory address of the first element in array?
a) array[0];
b) array[1];
c) array(2);
d) array;
Q13. Which of the following are good reasons to use an object oriented language?
a) you can define you own data types
b) an object oriented program can be taught to correct its own erros
c) it is easier to conceptualize an object
d) both (a) and (c)
Q14. When a language has the capability to produce new data types, it is called
a) extensible
b) overloaded
c) encapsulated
d) reprehensible
Q15. Dividing a program into functions
a) is the key to object oriented programming
b) makes the program easier to conceptualize
c) makes the program run faster
d) both (b) and (c)
Q16. A variable defined within a block is visible
a) throughout the functions
b) from the point of definition onward in the block
c) from the point of definition onward in the function
d) from the point of definition onward in the program
Q17. In object orient programming classes are useful because they
a) can closely model objects in the real word
b) bring together all aspects of an entity in one place
c) permit data to be hidden from other classes
d) all of these
Q18. Redirection redirects
a) a file from a device to a stream
b) a stream from a file to the screen
c) a device from the screen to a file
d) the screen from a device to a stream
Q19. The public files in a class library usually contain
a) variable definition, constant definition
b) class declaration, variable definition
c) member function definition
d) constant definition, class declaration
Q20. Breaking a program into several files is desirable because
a) some files don’t need to be recompiled each time
b) a program can be divided functionally
c) files can be marked in object form
d) all of these
Part 9: List for questions and answers of C ++ Language
Q1. Answer: a
Q2. Answer: b
Q3. Answer: b
Q4. Answer: b
Q5. Answer: a
Q6. Answer: a
Q7. Answer: d
Q8. Answer: a
Q9. Answer: b
Q10. Answer: a
Q11. Answer: a
Q12. Answer: d
Q13. Answer: d
Q14. Answer: a
Q15. Answer: d
Q16. Answer: b
Q17. Answer: d
Q18. Answer: b
Q19. Answer: a
Q20. Answer: c