Programming MCQs

Solved MCQ on C++ Programming set-5

Pinterest LinkedIn Tumblr
Here is the collection of solved MCQ on C++ programming language includes multiple-choice questions on fundamentals of C++. It includes solved MCQ on function in the C++ program, jump statement in C++, C++ exception handling, and run-time polymorphism in C++.

1. There is a unique function in the C++ program by where all C++ programs start their execution…….. A) start()
B) begin()
C) main()
D) output()

2. Which of the following is not a jump statement in C++?
A) break
B) Goto
C) Exit
D) Switch

3. The memory address of the first element of an array is called ……………….
A) floor address
B) foundation address
C) first address
D) base address

4. C++ exception handling mechanism mainly uses how many keywords?
A) Four
B) Three
C) Two
D) None of the above

5. When an exception is thrown, it needs to be …………………
A) Executed
B) Handled appropriately
C) Resolved
D) None of the above

6. After defining the function template, the next step to call it in another function such as ………
A) int()
B) secondary()
C) template()
D) main()

7. A file stream refers to the flow of data between a ……………
A) Program and object
B) Program and stream
C) Program and file
D) None of the above

8. ……………… are one of the attributes of C++ that support run-time polymorphism.
A) Pointers
B) Derived classes
C) Virtual functions
D) Heap tree

9. which of the following header file does not exist?
A) iostream
B) string
C) sstring
D) sstream

10. To increase the value of c by one, which of the following is wrong?
A) c++;
B) c=c+1;
C) c+1=>c;
D) c+=1;

Answers:

1. There is a unique function in the C++ program by where all C++ programs start their execution……..
C) main()

2. Which of the following is not a jump statement in C++?
D) Switch

3. The memory address of the first element of an array is called ……………….
D) base address

4. C++ exception handling mechanism mainly uses how many keywords?
B) Three

5. When an exception is thrown, it needs to be …………………
B) Handled appropriately

6. After defining the function template, the next step to call it in another function such as ………
D) main()

7. A file stream refers to the flow of data between a ……………
C) Program and file

8. ……………… are one of the attributes of C++ that support run-time polymorphism.
C) Virtual functions

9. which of the following header file does not exist?
C) sstring

10. To increase the value of c by one, which of the following is wrong?
C) c+1=>c;

Read Next: MCQ on c++ Programming with Answers set-6
Read More:
C++ Programming MCQ Question Collection

Please follow and like us:
RSS
Follow by Email
X (Twitter)
Visit Us
Follow Me
YouTube
YouTube
LinkedIn
linkedIn | Solved MCQ on C++ Programming set-5
Share

Author

Shuseel Baral is a web programmer and the founder of InfoTechSite has over 8 years of experience in software development, internet, SEO, blogging and marketing digital products and services is passionate about exceeding your expectations.

Comments are closed.

RSS
Follow by Email
X (Twitter)
Visit Us
Follow Me
YouTube
YouTube
LinkedIn
Share