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 06

October 31, 2014 by Suresh Khanal Leave a Comment

C++ MCQ Questions

C++ Multiple Choice Questions

101. What is the size of wchar_t in C++?
a) 2
b) 4
c) 2 or 4
d) depends on the number of bits in the system

 

102. Pick the odd one out
a) array type
b) character type
c) boolean type
d) integer type

 

103. Which datatype is used to represent the absence of parameters?
a) int
b) short
c) void
d) float

 

104. What does a escape code represent?
a) alert
b) backslash
c) tab
d) form feed

 

105. Which type is best suited to represent the logical values?
a) integer
b) boolean
c) character
d) all of above

 

106. Identify the user-defined types from the following?
a) enumeration
b) classes
c) both a and b
d) int

 

107. Which of the following statements are true for: int f(float)
a) f is a function taking an argument of type int and retruning a floating point number
b) f is a function taking an argument of type float and returning a integer.
c) f is a function of type float
d) none of the mentioned

 

108. The value 132.54 can represented using which data type?
a) double
b) void
c) int
d) bool

 

109. When a language has the capability to produce new data type mean, it can be called as
a) overloaded
b) extensible
c) encapsulated
d) reprehensible

 

110. Pick the odd one out.
a) integer, character, boolean, floating
b) enumeration, classes
c) integer, enum, void
d) arrays, pointer, classes

 

111. Is bool a fundamental datatype in C++?
a) Yes
b) No, it is a typedef of unsigned char
c) No, it is an enum of {false,true}
d) No, it is expanded from macros

 

112. Find the odd one out:
a) std::vector<int>
b) std::vector<short>
c) std::vector<long>
d) std::vector<bool>

 

113. What is the value of the bool? bool is_int(789.54)

a) True
b) False
c) 1
d) none of the mentioned

114. What happens when a null pointer is converted into bool?
a) An error is flagged
b) bool value evaluates to true
c) bool value evaluates to false
d) the statement is ignored

 

115. Which of the following statements are false?
a) bool can have two values and can be used to express logical expressions.
b) bool cannot be used as the type of the result of the function.
c) bool can be converted into integers implicitly
d) a bool value can be used in arithemetic expressions.

 

116. For what values of the expression is an if-statement block not executed?
a) 0 and all negative values
b) 0 and -1
c) 0
d) 0, all negative values, all positive values except 1

117. Which of the two operators ++ and — work for the bool datatype in C++?
a) None
b) ++
c) –
d) Both

 

118. Evaluate the following
(false && true) || false || true
a) 0
b) 1
c) false
d) none of the mentioned

 

119. Select the right option: Given the variables p, q are of char type and r, s, t are of int type (1) t = (r * s) / (r + s); (2) t = (p * q) / (r + s);
a) 1 is true but 2 is false
b) 1 is false and 2 is true
c) both 1 and 2 are true
d) both 1 and 2 are false

 

120. In C++, what is the sign of character data type by default?
a) Signed
b) Unsigned
c) Implementation dependent
d) None of these

Correct Answers to C++ MCQ Questions

101-d 102-1 103-c 104-a 105-b 106-C 107-b 108-a 109-b 110-c
111-a 112-d 113-b 114-c 115-b 116-c 117-b 118-b 119-c 120-c

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 Questions Set 1
  • C++ MCQ Questions Set 2
  • C++ MCQ Questions Set 3
  • C++ MCQ Questions Set 4
  • C++ MCQ Questions Set 5

Filed Under: C++ Tagged With: C++ MCQ PDF, C++ MCQ Questions, C++ Programming Language

← Solved C++ MCQs Set 03 Solved C++ MCQs Set 01 →

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

  • 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)
  • A simple protocol used for fetching email from a mail box is

MCQ Sets

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

Recent Comments

  • Ajay Rauniyar on Ask MCQ Sets
  • MCQ Questions for MS PowerPoint – Another 100 MCQs » MCQ Sets on Microsoft PowerPoint MCQ Questions – The next 100 MCQs
  • MCQ Questions for MS PowerPoint – Another 100 MCQs » MCQ Sets on MS Office MCQ Questions with Answers [ PowerPoint ] – The first 100 MCQs
  • Suresh Khanal on Solved Question Paper of Computer Operator – Nepal Khadya Sansthan
  • Suresh Khanal on Ask MCQ Sets