C++ Programming - OOPS Concepts - Discussion
Discussion Forum : OOPS Concepts - General Questions (Q.No. 33)
33.
Which of the following statement is correct?
Discussion:
11 comments Page 1 of 2.
Arnab Pratihar said:
4 weeks ago
C++ allows static type checking normally and dynamic type checking (by using the virtual keyword).
But other options are incorrect:
Constant function promises that it can't modify the object, only receives and performs non-modifiable operations.
Where a static member function doesn't depend on the objects.
So both are not related.
But other options are incorrect:
Constant function promises that it can't modify the object, only receives and performs non-modifiable operations.
Where a static member function doesn't depend on the objects.
So both are not related.
Pulkit said:
5 years ago
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.
Vishal said:
7 years ago
But what for is it checking for?
I mean the compiler already checks for syntax error.
I mean the compiler already checks for syntax error.
KOMAL...! said:
9 years ago
C++ allows static type checking and C++ allows dynamic type checking
Rajmani said:
10 years ago
Can anyone explain why third option is incorrect?
Kavya said:
1 decade ago
Static type: Checking code at the compile time.
Dynamic type: Checking code at the run time.
Dynamic type: Checking code at the run time.
John said:
1 decade ago
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.
Dynamic type checking: checking the code of program at the time of late binding ie. At runtime.
(1)
Atul patel said:
1 decade ago
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.
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.
(2)
Shashikant said:
1 decade ago
can anyone explain what is static type checking and dynamic type checking.??
GOVIND said:
1 decade ago
In the concept of early and late binding.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers