MCQ Sets

  • Mock Ups
    • Computer Operator
      • 73-01
      • 73-02
      • 73-03
      • 73-04
      • 73-05
      • 73-06
    • Assistant Computer Operator
  • Quiz
    • Computer Fundamentals
    • Operating Systems
    • MS Word
    • MS Excel
    • MS PowerPoint
    • MS Access
    • HTML
  • Sets
    • Computer Fundamentals
    • Operating System
    • Microsoft Word
    • MS Excel
    • MS PowerPoint
    • MS Access
    • HTML & Web Page Designing
    • C++
    • Data Structures & Algorithms
  • Read
    • Tips & Articles
    • Fundamentals
    • MS Word
    • DBMS
    • Operating Systems
    • HTML & Web Page Design
  • Videos
  • Ask
    • Ask MCQ Sets
    • Discussion Forum
  • Downloads
  • Old Question Papers

Solved C++ MCQs Set 03

October 27, 2014 by Suresh Khanal 3 Comments

C++ MCQ Questions

C++ Multiple Choice Questions

41. Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
a. Namespaces refer to the memory space allocated for names used in a program
b. Namespaces refer to space between teh names in a program
c. Namespaces refer to space between the names in a program
d. namespaces provide facilities for organizing the names in a program to avoid name clashes

42. Which of the following language is not supported by C++?
a. Exception Handling
b. Reflection
c. Operator Overloading
d. Namespaces

43. class derived: public base1, public base2 { } is an example of
a. Polymorphic inheritance
b. Multilevel inheritance
c. Hierarchical inheritance
d. Multiple inheritance

44. Which of the following languages is a subset of C++ language?
a. C language
b. Java Language
c. C# language
d. language

45. How do we declare an ‘interface’ class?
a. By making all the methods pure virtual in a class
b. By making all the methods abstract using the keyword ‘abstract’ in a class
c. By declaring the class as interface with the keyword ‘interface’
d. It is not possible to create interface class in C++

46. How do we declare an abstract class?
a. By providing at least one pure virtual method (function signature followed by ==0;) in a class
b. By declaring at least one method abstract using the keyword ‘abstract’ in a class
c. By declaring the class abstract with the keyword ‘abstract’
d. It is not possible to create abstract classes in C++

47. Which of the following is not an advantage of secondary memory
a. It is cost-effective
b. It has large storage capacity
c. It has highest speed
d. It is easily portable

48. What happens when a pointer is deleted twice?
a. It can abort the program
b. It can cause a failure
c. It can cause an error
d. It can cause a trap

49. Which of the following language feature is not an access specifier in C++?
a. public
b. private
c. C protected
d. internal

50. Expression C=i++ causes
a. Value of i assigned to C and then i incremented by 1
b. i to be incremented by 1 and then value of i assigned to C
c. Value of i assigned to C
d. i to be incremented by 1

51. The statement i++; is equivalent to
a. i = i + i;
b. i = i + 1;
c. i = i - 1;
d. i --;

52. In C language, a hexadecimal number is represented by writing
a. x
b. xo
c. ox
d. h

53. Which of the following library function below by default aborts the program?
a. Terminate()
b. end()
c. Abort()
d. exit()

54. If a member needs to have unique value for all the objects of that same class, declare the member as
a. Global variable outside class
b. Local variable inside constructor
c. Static variable inside class
d. Dynamic variable inside class

55. Value of ix+j, if i,j are integer type and ix long type would be
a. integer
b. float
c. long integer
d. double percision

56. Which of the following below can perform conversions between pointers to related classes?
a. A. cast_static
b. B. dynamic_cast
c. c. static_cast
d. D. cast_dynamic

57. How do we define a constructor?
a. a. x~() {}
b. B. X() {}~
c. C. X() ~{}
d. D. ~X() {}

58. Vtables
a. creates a static table per class
b. creates a static table per object
c. creates a dynamic table per class
d. creates a dynamic table per object

59. When class B is inherited from class A, what is the order in which the constructers of those classes are called
a. Class A first Class B next
b. Class B first Class A next
c. Class B's only as it is the child class
d. Class A's only as it is the parent class

60. Which of the following is the most general exception handler that catches exception of any type?
a. catch(std::exception)
b. catch(std::any_exception)
c. catch(…)
d. catch()

Correct Answers to C++ MCQ Questions

41 - d 42 - d 43 - b 44 - d 45 - a 46 - a 47 - a 48 - c 49 - d 50 - d
51 - a 52 - b 53 - d 54 - a 55 - b 56 - c 57 - C 58 - D 59 - a 60 - a

Please, let us know if you discover any error or mistake in these MCQ sets. Don't hesitate to leave your comments.

Download MCQ Questions PDF File for C++

Please visit Downloads section to download the pdf file of these MCQs from C++.

Other C++ MCQ Questions

  • C++ MCQ Question Set 1
  • C++ MCQ Questions Set 2

Filed Under: C++ Tagged With: C, c++, C++ Pdf File, C++ Programming, C++ Questions, mcq, multiple choice questions

Solved C++ MCQs Set 06 →

Comments

  1. Priyanka Mahani says

    June 25, 2015 at 1:34 pm

    Superb collection for ready reference and placement preparation.
    Thank you for sharing..

    Reply
  2. prasanjeet says

    November 24, 2016 at 5:53 pm

    In Q 43
    Ans is Multiple inheritance

    class P: public M,public N
    {

    body//

    }

    Reply
  3. hinoto says

    March 26, 2017 at 2:07 pm

    Sir most of your ans are wrong

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

User manuals http://manymanuals.com

Published MCQs for:

  • Computer Fundamentals
  • Operating Systems (Basics)
  • Word Processing (MS Word)
  • Spread Sheet (MS Excel)
  • Presentation (MS PowerPoint)
  • DBMS (MS Access)
  • Webpage Designing (HTML)
  • C++ Programming Language
  • Data Structures & Algorithms

Reading Materials for:

Fundamentals of Computers
► Syllabus of Computer Fundamentals
► Introduction to Computer Fundamentals
► History of Computers
► Computer Generations
► Classification of Computers
► Computer System
► Computer Hardware Concept
► Computer Software Concept
► Computer Networking
► Number System

Recent Posts

  • Which of the following is not an operating system?
  • Computer Networks MCQ Questions and Answers with PDF Download
  • Online Quiz MS PowerPoint
  • Solved Question Paper of PSC for NARC 2074-2-18
  • Computer Basics – Solved Question Paper of MPA 2017 (Spring) – Purbanchal University (PU)

MCQ Sets

  • Home
  • About Us
  • Contact Us
  • Privacy Policy
  • User Testimonials
  • Help MCQ Sets Grow More!
  • RSS Feeds
  • Sitemap

Recent Comments

  • Sabina Khadgi on 101 to 200 MCQ Questions from Microsoft Excel
  • Suresh Khanal on MCQ Sets Downloads
  • emma on MCQ Sets Downloads
  • Solved C++ MCQs Set 03 » MCQ Sets on Solved C++ MCQs Set 01
  • Download Solved C++ MCQ PDF file and Prepare Offline on Solved C++ MCQs Set 01