C/C MCQ Quiz Hub

C Programming MCQS Set-4

Choose a topic to test your knowledge and improve your C/C skills

To use external linkage we have to use which keyword?





✅ Correct Answer: 2

Which is used to use a function from one source file to another?





✅ Correct Answer: 3

What is the use of no linkage?





✅ Correct Answer: 3

What is the user-defined header file extension in c++?





✅ Correct Answer: 2

Which of the following keyword is used to declare the header file?





✅ Correct Answer: 1

Identify the incorrect statement.





✅ Correct Answer: 1

What does a default header file contain?





✅ Correct Answer: 3

setprecision requires which of the following header file?





✅ Correct Answer: 2

Which of the following header file does not exist?





✅ Correct Answer: 3

Which of the header file must be included to use stringstream?





✅ Correct Answer: 2

Which of the following header files is required for creating and reading data files?





✅ Correct Answer: 2

What does a class in C++ holds?





✅ Correct Answer: 3

Which is used to define the member of a class externally?





✅ Correct Answer: 2

Which other keywords are also used to declare the class other than class?





✅ Correct Answer: 4

Which of the following is a valid class declaration?





✅ Correct Answer: 1

The data members and functions of a class in C++ are by default _______





✅ Correct Answer: 2

Constructors are used to ___________





✅ Correct Answer: 1

When struct is used instead of the keyword class means what will happen in the program?





✅ Correct Answer: 1

Which category of data type a class belongs to?





✅ Correct Answer: 3

How the objects are self-referenced in a member function of that class.





✅ Correct Answer: 2

What does a mutable member of a class mean?





✅ Correct Answer: 3

Which keyword is used to define the user defined data types?





✅ Correct Answer: 3

Where does the object is created?





✅ Correct Answer: 1

How to access the object in the class?





✅ Correct Answer: 3

Which of these following members are not accessed by using direct member access operator?





✅ Correct Answer: 4

Pick out the other definition of objects.





✅ Correct Answer: 4

How many objects can present in a single class?





✅ Correct Answer: 4

Which special character is used to mark the end of class?





✅ Correct Answer: 1

Pick the other name of operator function.





✅ Correct Answer: 2

Which of the following operators can’t be overloaded?





✅ Correct Answer: 1

How to declare operator function?





✅ Correct Answer: 1

Which of the following statements is NOT valid about operator overloading?





✅ Correct Answer: 2

Operator overloading is ___________





✅ Correct Answer: 4

What is operator overloading in C++?





✅ Correct Answer: 4

What is the syntax of overloading operator + for class A?





✅ Correct Answer: 1

How many approaches are used for operator overloading?





✅ Correct Answer: 3

Which of the following operator cannot be overloaded?





✅ Correct Answer: 2

Which of the following operator can be overloaded?





✅ Correct Answer: 4

Which of the following operator cannot be used to overload when that function is declared as friend function?





✅ Correct Answer: 4

Choose the operator which cannot be overloaded.





✅ Correct Answer: 3

In which direction does the assignment operation will take place?





✅ Correct Answer: 2

Pick out the compound assignment statement.





✅ Correct Answer: 3

What is the associativity of add(+);?





✅ Correct Answer: 2

What is the name of | operator?





✅ Correct Answer: 2

Which operator is having the highest precedence in c++?





✅ Correct Answer: 2

subscript operator is used to access which elements?





✅ Correct Answer: 3

How many arguments will the subscript operator will take for overloading?





✅ Correct Answer: 1

Pick out the correct statement.





✅ Correct Answer: 1

What do we need to do to pointer for overloading the subscript operator?





✅ Correct Answer: 2

What do we need to use when we have multiple subscripts?





✅ Correct Answer: 2

What is the use of function call operator?





✅ Correct Answer: 2

Pick out the correct statement.





✅ Correct Answer: 1