C++ Programming - OOPS Concepts - Discussion

Discussion :: OOPS Concepts - General Questions (Q.No.33)

33. 

Which of the following statement is correct?

[A]. C++ allows static type checking.
[B]. C++ allows dynamic type checking.
[C]. C++ allows static member function be of type const.
[D]. Both A and B.

Answer: Option D

Explanation:

No answer description available for this question.

Kalpana said: (Aug 7, 2012)  
In c++ allows both static and dynamic.

Govind said: (Feb 23, 2013)  
In the concept of early and late binding.

Shashikant said: (Aug 5, 2013)  
can anyone explain what is static type checking and dynamic type checking.??

Atul Patel said: (Aug 16, 2013)  
Yes.

Static type checking is checking the type of reference and object for normal reference.

And dynamic type checking is checking reference type of polymorphic reference.

John said: (Sep 25, 2013)  
Static type checking: checking the code of program at the time of early binding ie. At compile time.

Dynamic type checking: checking the code of program at the time of late binding ie. At runtime.

Kavya said: (Aug 6, 2015)  
Static type: Checking code at the compile time.

Dynamic type: Checking code at the run time.

Rajmani said: (Sep 29, 2015)  
Can anyone explain why third option is incorrect?

Komal...! said: (Jul 14, 2016)  
C++ allows static type checking and C++ allows dynamic type checking

Vishal said: (Dec 8, 2018)  
But what for is it checking for?

I mean the compiler already checks for syntax error.

Pulkit said: (Sep 16, 2020)  
A 'const member function' is not allowed to modify the object it is called on, but static member functions are not called on any object. It is used directly by scope resolution operator. Thus having a const static member function makes no sense, hence it is illegal.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.