C++ Programming Multiple Choice Questions and Answers

C++ Programming Multiple Choice Questions and Answers

C++ Programming Multiple Choice Questions and Answers. C++ MCQ Questions and answers pdf for the preparation of MCA, BCA & IT exams.

Are you looking to sharpen your C Programming skills? This article provides an overview of C Programming Multiple Choice Questions and Answers. We will review the types of questions that are commonly asked, as well as some tips on how to best prepare for them.

Whether you are a beginner or experienced programmer, this article is sure to help you improve your understanding of C programming. With certain strategies and practice, you can greatly increase your coding proficiency.

C++ Programming

C++ Programming Multiple Choice Questions and Answers

1) High-Level Languages like C, Basic, Fortran are also known as Procedural Languages.
a) True
b) False

Answer: A

2) The Procedural Languages focused on organized program statements into ___ or ___.
a) Procedure, Functions
b) Module, OOP
c) High, Low
d) None of these

Answer: A

3) More than one function had to access data ___ variables were used.
a) Local
b) Automatic
C) Global
d) Static

Answer: C

4) ___ is an OOPS Language.
a) C, Pascal, Fortran
b) C++, Small Talk, Java
c) .Net, VB, Oracle
d) None of these

Answer: B

5) ___ is a Program representation of some real-world thing.
a) Object
b) Class
c) Attributes
d) Function

Answer: A

6) Objects are ___of a class
a) Instances
b) Classes
c) Attributes
d) None of these

Answer: A

7) ___ features allow easy modification of existing code and also reuse code.
a) Inheritance
b) Polymorphism
c) Data Hiding
d) Overloading

Answer: A

8) Polymorphism is a feature of C++ where the same functions behave differently depending upon what they are operating on.
a) True
b) False

Answer: A

9) Double data type takes 4 bytes in size.
a) True
b) False

Answer: A

10) ___ is a header file used in C++ that handles input and output functions.
a) stdio.h
b) iostream.h
c) conio.h
d) string.h

Answer: B

11) Break statement takes the control out of the switch statement.
a) True
b) False

Answer: A

12) ___ operator acts as a shortcut for the if-else statement.
a) Unary
b) Conditional
c) Logical
d) Increment/Decrement

Answer: B

13) ___ Loop executed the statements at least once
a) while
b) Do-while

Answer: B

14) All the parts for Loop like Loop initialization, Loop termination, condition statement for the next iteration are all included in one statement.
a) True
b) False

Answer: A

15) ___ header file should be included to use the exit function.
a) Process.h
b) conio.h
c) stdio.h
d) iostream.h

Answer: A

16) ___ can be defined as data structures that allow storing a group of data of the same datatype.
a) Array
b) Structure
c) Union
d) String

Answer: A

17) The index number starts with ___ and the last index number of an array of size n will be ___
a) 0, n-1
b) 1,n
c) 0, n+1
d) 0,n

Answer: A

18) All the elements are enclosed in an Array within ___ brackets.
a) flower
b) small
c) Large

Answer: A

19) An array with the declaration int a[4][5] can store ___ numbers
a) 20
b) 9
c) 21
d) 19

Answer: A

20) String stores an extra ___ character for every string to mark the end of the string
a) null
b) ‘\0’
c) /0
d) None of these

Answer: A

21) cin.get (str,40);
To read multiple lines of text from the user. It reads 39 characters maximum
a) True
b) False

Answer: A

22) ___ member function of cin allows user to input embedded blanks and linefeed within the string
a) get
b) getline
c) gets
d) None of these

Answer: A

23) If there are no arguments in a function ___ should be specified within the brackets.
a) void
b) int
c) ;
d) None of these

Answer: A

24) More than one user-defined function can have the same name and perform different operations. This feature of c++ is known as ___.
a) Function overloading
b) operator overloading
c) overloading
d) None of these

Answer: A

25) In Passing the argument by ___ no copy of the variable is created.
a) value
b) reference

Answer: B

26) ___ arguments are whose values need not be explicitly passed during the function call.
a) default
b) format
c) actual

Answer: A

27) ___ functions enable programmers to save processing time by reducing the overheads involved in the function call.
a) inline
b) external
c) void

Answer: A

28) Classes are defined with the keyword ___ followed by the name of the class.
a) class
b) object
c) c) public

Answer: A

29) ___ function is an external function that can access the private data members of a class.
a) Friend
b) Protected
c) getdata()
d) None of these

Answer: A

30) ___ member function invoked automatically whenever the objects are destroyed or expired
a) destructor ~
b) constructor ~

Answer: A

31) The data and functions are ___by default if no keyword can be omitted.
a) Public
b) Private
c) Protected

Answer: B

32) Constructors can have arguments and can be overloaded.
a) True
b) False

Answer: A

33) ___ data members of the classes that are common for all the objects of the class and are accessible for the class.
a) Static
b) Dynamic
c) Private
d) Public

Answer: A

34) Dot operator, scope resolution (::) operator, conditional operator (?:) can be overloaded.
a) True
b) False

Answer: B

35)Some of the Unary operators are ++, — and minus(-)
a) True
b) False

Answer: A

36) Member Function of a class can be defined outside the class using the ___ operator along with the class name.
a) binary
b) scope resolution (::) operator
c) relational
d) overloading

Answer: B

37) ___ function can act as a bridge between two classes using a single function to operate on multiple data types.
a) Friend
b) Operator
c) Public
d) Protected

Answer: A

38) Several operators such as dot operator, scope resolution (::), conditional operator (?:) etc. can be overloaded
a) True
b) False

Answer: B

39 Operator overloading feature helps to change the functionality of operators with any data type.
a) True
b) False

Answer: A

40. It is necessary to overload operators for all classes.
a) True
b) False

Answer: B

41) Object-oriented programming approach is bundling both data and ___ into one unit known as ___.
a) functions, object
b) Procedure, class
c) information, procedure
d) None of these

Answer: A

42) Class and object support ___ and ___ which are describing the terms of object-oriented programming languages.
a) data encapsulation, data hiding
b) data, function
c) inheritance, polymorphism
d) None of these

Answer: A

43) C++ program file is saved with an ___ extension. The source code has to be converted to an ___code with ___ extension is created.
a) .cpp, object code, .obj
b) .c, source code, .link
c) .cpp, object code, .exe
d) All of the above

Answer: A

44) ___ statement allows choosing a set of statements for execution depending on a condition. If statement and ___ statement allows selection in c++.
a) Selection, switch
b) Iteration, conditional
c) Selection, conditional
d) None of these.

Answer: A

45) In exception handling, ___ keywords are used
a) Try
b) Catch
c) Throw
d) All

Answer: D

46) char name[20]
name=” Good Morning”;
This is True or False
a) True
b) False

Answer: B

47) Char str[]; is a valid statement
a) True
b) False

Answer: B

48) Part1. Every function has three components
a) return value
b) function name
c) set of arguments
d) None of these
Part 2. Every function may not return a value
a) 1) True2) false
b) 1) True2) True

Answer: A

49) Data can be passed to functions in Two ways ___ & ___
a) Passing by value, Passing by reference
b) Pass by data, Pass by address

Answer: A

50) ___ are member functions of a class that has the same name as the class name. ___ are called automatically whenever an object of the class is created.
a) constructor, constructor
b) constructor, destructor
c) class, ~
d) ~, constructor

Answer: A

Conclusion

C programming is a powerful language that allows the user to create amazing programs. It is important to understand the fundamentals of the language, as well as practice solving C programming multiple choice questions and answers in order to master it.

With consistency and dedication, you will be able to become a confident C programmer. Therefore, start your journey today and increase your knowledge of this powerful language. Finally, don’t forget to have fun while learning – this will help you stay motivated and make the experience more enjoyable.

Thanks for reading C++ Programming Multiple Choice Questions and Answers, you may download pdf form of these MCQs, please share on social media.

Read More:

2 thoughts on “C++ Programming Multiple Choice Questions and Answers”

  1. the work is so legit.
    should also consider the essay question and also should include the project questions.
    thank you.

Leave a Comment

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

Scroll to Top