1. The document is an assessment test for a Programming in C++ class containing 10 multiple choice questions about C++ fundamentals.
2. The questions cover topics like the inventor of C++, the differences between C++ and other languages, basic syntax like comments and identifiers, approaches used by C++, output of sample code, types provided by C++ but not C, default file opening mode in C++, when a constructor is executed, and the extension for user-defined header files.
3. The test has 10 questions each worth 1 mark for a total of 10 marks.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
76 views2 pages
Improvement Test
1. The document is an assessment test for a Programming in C++ class containing 10 multiple choice questions about C++ fundamentals.
2. The questions cover topics like the inventor of C++, the differences between C++ and other languages, basic syntax like comments and identifiers, approaches used by C++, output of sample code, types provided by C++ but not C, default file opening mode in C++, when a constructor is executed, and the extension for user-defined header files.
3. The test has 10 questions each worth 1 mark for a total of 10 marks.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
B L D E A’s V. P.Dr. P . G.
Halakatti College of Engineering and Technlogy, Vijayapur
Department of Artificial and Intelligence andMachine Learning. 2nd Internal Assessment Test Class: 3rd Sem Sub: “Programming in C++” Sub Code: 21CS382 Date: 07-01-2023 Q.No. Answer the objective type questions Max Marks20 1. Who invented C++? 1*10=10 a) Dennis Ritchie b) Ken Thompson c) Brian Kernighan d) Bjarne Stroustrup Answer: Option C 2. What is C++? a) C++ is an object oriented programming language b) C++ is a procedural programming language c) C++ supports both procedural and object oriented programming language d) C++ is a functional programming language Answer: Option A 3. Which of the following is used for comments in C++? a) /* comment */ b) // comment */ c) // comment d) both // comment or /* comment */ Answer: Option D 4. Which of the following is a correct identifier in C++? a) VAR_1234 b) $var_name c) 7VARNAME d) 7var_name Answer: Option A 5. Which of the following approach is used by C++? a) Left-right b) Right-left c) Bottom-up d) Top-down Answer: Option C 6. What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; int main(int argc, char const *argv[]) { char s1[6] = "Hello"; char s2[6] = "World"; char s3[12] = s1 + " " + s2; cout<<s3; return 0; } a) Hello b) World c) Error d) Hello World Answer: Option D 7. Which of the following type is provided by C++ but not C? a) double b) float c) int d) bool Answer: Option D 8. By default, all the files in C++ are opened in _________ mode. a) Binary b) VTC c) Text d) ISCII Answer: Option C 9. Constructor is executed when _____. a) an object is created b) an object is used c) a class is declared d) an object goes out of scope. Answer: Option A 10 Identify the correct extension of the user-defined header file in C++. . a)cpp b)hg c)h d)hf Answer: Option C