c++ Question Paper 1

March 17, 2017 | Author: kumarnani06 | Category: N/A
Share Embed Donate


Short Description

Download c++ Question Paper 1...

Description

Question No. 1 of 30 The first fully Object-oriented language is a. Java b. C++ c. Simula d. None of the Above Question No. 2 of 30 The value of EOF is a. 1 b. 0 c. Infinity d. -1 Question No. 3 of 30 Which of the following notation compares two variables X and Y? a. X==Y b. X=Y c. X!=Y d. X equals Y Question No. 4 of 30 Which of the following denote stream classes in C++? a. ios b. fstream c. ostream d. All the Above Question No. 5 of 30 Which of the following allocates memory but does not initialize it? a. new operator b. operator new c. Both A and B d. None of the Above Question No. 6 of 30 Which of the following statements are TRUE? a. Reference variables must be initialized in C++ b. Array of reference is possible c. Both A) and B) d. None of the Above Question No. 7 of 30 The private member in derived class a. Cannot be inherited b. Can be inherited at all instances c. Can be inherited only if the derived class is inheriting from base class with private access level d. None of the Above

Question No. 8 of 30 Which of the following is used in C++ to create a copy of an object? a. Assignment operator b. Copy constructor c. Both A) and B) d. None of the Above Question No. 9 of 30 Which of the following denote insertion operator in C++? a. & b. < c. << d. ! Question No. 10 of 30 The output of operation 20%3 is a. 6 b. 2 c. 1 d. 4 Question No. 11 of 30 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 Question No. 12 of 30 Which of the following denote operator of logical AND? a. && b. ^& c. !& d. & Question No. 13 of 30 Which of the following operators cannot be overloaded? a. sizeof b. :: c. :? d. All the Above Question No. 14 of 30 The vtable entry for a pure virtual function in C++ is a. zero b. NULL c. one d. No Entry in vtable

Question No. 15 of 30 Virtual functions are defined in a. Derived class b. Base class c. Both A and B d. None of the Above Question No. 16 of 30 Comments in C++ program is written by using a. / / b. // c. /* /* d. * Question No. 17 of 30 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 Question No. 18 of 30 Which of the following denotes growable array? a. Vector b. ArrayList c. Both A and B d. None of the Above Question No. 19 of 30 Reference to its own class can be accepted by a. simple constructor b. copy constructor c. Both A and B d. None of the Above Question No. 20 of 30 The operator that denotes address of a variable in C++ program is a. * b. % c. $ d. & Question No. 21 of 30 The notation used for representing destructor in C++ program is a. ! b. & c. * d. ~

Question No. 22 of 30 The header that should be included while using manipulators in C++ is a. iomanip.h b. manip.h c. ifstream.h d. None of the Above Question No. 23 of 30 The isolation of data from direct access by a C+ program is called as a. Data Hiding b. Data Isolation c. Data Encapsulation d. None of the Above Question No. 24 of 30 The notation of member access operator in structures is a. & b. . c. $ d. * Question No. 25 of 30 The notation of logical NOT operator in a C++ program is a. : b. ; c. ! d. None of the Above Question No. 26 of 30 In C++ the function that is used to release the block of memory already used is a. release b. deallocate c. delete d. All the Above Question No. 27 of 30 An instance of a user-defined type is called a. Class b. Object c. Method d. None of the Above Question No. 28 of 30 Which of the following denote types of polymorphism in C++? a. Virtual function b. Function overloading c. Operator Overloading d. All the Above

Question No. 29 of 30 Which of the following can be used to initialize a newly declared variable from an existing variable? a. Virtual Function b. Namespaces c. copy constructor d. None of the Above Question No. 30 of 30 A function in a C++ program can be called a. Only Once b. Cannot be called at all c. Any number of times d. None of the Above

1. The first fully Object-oriented language is Answer: Simula 2. Which of the following notation compares two variables X and Y? Answer: X==Y 3. Which of the following denote stream classes in C++? Answer: All the Above 4. Which of the following allocates memory but does not initialize it? Answer: operator new 5. The private member in derived class Answer: Can be inherited only if the derived class is inheriting from base class with private access level 6. Which of the following is used in C++ to create a copy of an object? Answer: Copy constructor 7. The output of operation 20%3 is Answer: 2 8. If a function in C++ does not return a value then its return type is denoted as Answer: void 9. Which of the following denote operator of logical AND? Answer: && 10. Which of the following operators cannot be overloaded? Answer: All the Above 11. Virtual functions are defined in Answer: Derived class 12. Comments in C++ program is written by using Answer: // 13. In Late binding the function calls gets resolved during Answer: Run Time 14. The operator that denotes address of a variable in C++ program is Answer: & 15. The notation used for representing destructor in C++ program is Answer: ~ 16. The header that should be included while using manipulators in C++ is Answer: iomanip.h 17. The notation of member access operator in structures is Answer: . 18. The notation of logical NOT operator in a C++ program is Answer: ! 19. In C++ the function that is used to release the block of memory already used is Answer: delete 20. An instance of a user-defined type is called Answer: Object 21. Which of the following denote types of polymorphism in C++? Answer: All the Above

22. Which of the following can be used to initialize a newly declared variable from an existing variable? Answer: copy constructor 23. A function in a C++ program can be called Answer: Any number of times Incorrect Questions (7 / 30) 1. The value of EOF is Answer: -1 2. Which of the following statements are TRUE? Answer: Reference variables must be initialized in C++ 3. Which of the following denote insertion operator in C++? Answer:
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF