Mastering C++ Quiz Test your knowledge about the C++ programming language with this quiz. From basic concepts to advanced features, see how well you know C++! alina90 published on March 27 Stacked 1/10 What is the correct syntax for a multi-line comment in C++? // This is a comment /** This is a comment **/ # This is a comment /* This is a comment */ 2/10 Which of the following is NOT a fundamental data type in C++? int double string char 3/10 What does the 'cin' object in C++ represent? Output stream Error stream Input stream Standard output 4/10 Which keyword is used to define a class in C++? struct private class void 5/10 What is the correct way to declare a pointer in C++? int* ptr; *int ptr; ptr int; pointer ptr; 6/10 Which operator is used for memory allocation in C++? malloc new alloc memalloc 7/10 What is the purpose of 'virtual' keyword in C++? Make a method static Enable dynamic binding Restrict inheritance Define a pure virtual function 8/10 Which of the following is a correct way to pass arguments to a function by reference in C++? int func(&num) int func(int &num) int func(*num) int func(int *num) 9/10 What does the 'endl' manipulator do in C++? Insert a newline character Clear the output buffer Print the error message Ignore the remaining input 10/10 Which header file should be included to use 'cout' in C++? <stdio.h> <conio.h> <iostream> <stdlib.h>