• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 25 pages
Exam (elaborations)

100 TOP C++ Programming Multiple Choice Questions and Answers

Document preview thumbnail
Preview 3 out of 25 pages

100 TOP C++ Programming Multiple Choice Questions and Answers C++ Programming Multiple Choice Questions and Answers :- 1. If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)? a. const X* const b. X* const c. X* d. X& 2. Which classes allow primitive types to be accessed as objects? a. Storage b. Virtual c. Friend d. Wrapper 3. When is std::bad_alloc exception thrown? a. When new operator cannot allocate memory

Content preview

1/14/2017 100 TOP C++ Programming Multiple Choice Questions and Answers C++ Programming Questions and Answers




Engineering Interview Questions.com
Engineering interview questions,multiple choice questions,objective type
questions,seminor topics,lab viva questions and answers ,online quiz test
pdf free download for freshers.

HOME interview Questions MCQs *LAB VIVA CLASS NOTES
SEMINAR TOPICS ONLINE TEST GATE IIT JEE CAT


Home » C++ Programming Questions and Answers » Search

100 TOP C++ Programming Multiple Choice
Questions and Answers


100 TOP C++ Programming
Multiple Choice Questions
and Answers


Posted on November 17, 2015 by engineer 4
Comments




C++ Programming Multiple Choice
Questions and Answers :-
1. If the class name is X, what is the type of its “this”
pointer (in a nonstatic, non-const member function)?


a. const X* const

b. X* const
http://engineeringinterviewquestions.com/c-programming-multiple-choice-questions-and-answers/ 1/25

,1/14/2017 100 TOP C++ Programming Multiple Choice Questions and Answers C++ Programming Questions and Answers

c. X*

d. X&

2. Which classes allow primitive types to be accessed as
objects?


a. Storage

b. Virtual

c. Friend

d. Wrapper


3. When is std::bad_alloc exception thrown?

a. When new operator cannot allocate memory
Engineering
Questions
b. When alloc function fails
Facebook

c. When type requested for new operation is considered
bad, thisexception is thrown Find us on
d. When delete operator cannot delete the allocated Google Plus
(corrupted) object
Engineering inte

Follow
4. Which one of the following is not a fundamental data
type in C++ 430 followers



a. float

b. string

c. int


d. wchar_t

5. Which of the following is a valid destructor of the class
http://engineeringinterviewquestions.com/c-programming-multiple-choice-questions-and-answers/ 2/25

, 1/14/2017 100 TOP C++ Programming Multiple Choice Questions and Answers C++ Programming Questions and Answers

name “Country”

a. int ~Country()

b. void Country()


c. int ~Country(Country obj)

d. void ~Country()

6. Which of the following correctly describes C++
language?

a. Statically typed language


b. Dynamically typed language

c. Both Statically and dynamically typed language

d. Type-less language

7. Which of the following keyword supports dynamic
method resolution?

a. abstract


b. Virtual

c. Dynamic

d. Typeid

8. Which of the following is the most preferred way of
throwing and handling exceptions?


a. Throw by value and catch by reference.

b. Throw by reference and catch by reference.

http://engineeringinterviewquestions.com/c-programming-multiple-choice-questions-and-answers/ 3/25

Document information

Uploaded on
March 18, 2024
Number of pages
25
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$19.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
1
Followers
1
Items
29
Last sold
2 year ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions