C++ Questions

Q:

What is the Run-Time Type Information?

A) Information about an object’s datatype at runtime B) Information about the variables
C) Information about the given block D) None of these
 
Answer & Explanation Answer: A) Information about an object’s datatype at runtime

Explanation:

With the help of RTTI, We can get the information about the data type at the runtime.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3060
Q:

What are static and dynamic type checking?

Answer

Type checking is the operation on which the arguments that can only be applied for.


Static type checking performs the type checking operation before the execution of the program. To perform this operation, the arguments, expressions, variables must be given a data type.


Dynamic type checking performs the type checking operation at the time of the program execution. To perform this operation, the arguments, expressions, variables must be given a data type.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

2 3034
Q:

Where does the standard exception classes are grouped?

A) namespace std B) error
C) catch D) none of these
 
Answer & Explanation Answer: A) namespace std

Explanation:

:As these are standard exceptions, they need to be defined in the standard block, So it is defined under namespace std.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 2950
Q:

What is function prototype in C++?

Answer

A function prototype is a declaration of a function that omits the function body. It specifies the function’s name, argument types and return type.


E.g. int add(int,int)

Report Error

View answer Workspace Report Error Discuss

Subject: C++
Job Role: Software Architect

0 2934
Q:

What kind of object is modifying sequence algorithm?

A) Function template B) Class template
C) Method D) None of these
 
Answer & Explanation Answer: A) Function template

Explanation:

It is a group of functions and implemented under algorithm header file.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 2906
Q:

What is an explicit constructor?

Answer

A conversion constructor declared with the explicit keyword. The compiler does not use an explicit constructor to implement an implied conversion of types. It’s purpose is reserved explicitly for construction

Report Error

View answer Workspace Report Error Discuss

Subject: C++
Job Role: Software Architect

0 2826
Q:

What are the features of C++ different from C?

Answer

All the features of C are similiar to C++ except some features, such as polymorphism, operator overloading which are supported in C++ but not in C language.

Both C and C++ language is similiar in their functionality but C++ provides with more tools and options.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2795
Q:

Exlpain STL.

Answer

STL stands for Standard Template Library. It is a library of container templates approved by the ANSI committee for inclusion in the standard C++ specification.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 2739