JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Object Oriented Programming interview questions part 46
Object Oriented Programming interview questions part 46
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which among the following is wrong syntax related to static data members?
A. className :: staticDataMember;
B. dataType className :: memberName =value;
C. static dataType memberName;
D. className : dataType -> memberName;
Show Correct Answer
Correct Answer is :
className : dataType -> memberName;
2. Which among the following is correct definition for static member functions?
A. Functions created to allocate constant values to each object
B. Functions made to maintain single copy of member functions for all objects
C. Functions created to define the static members
D. Functions made to manipulate static programs
Show Correct Answer
Correct Answer is :
Functions made to maintain single copy of member functions for all objects
3. Which among the following is correct definition for static member functions?
A. Functions created to allocate constant values to each object
B. Functions made to maintain single copy of member functions for all objects
C. Functions created to define the static members
D. Functions made to manipulate static programs
Show Correct Answer
Correct Answer is :
Functions made to maintain single copy of member functions for all objects
4. The static member functions __________________
A. Have access to all the members of a class
B. Have access to only constant members of a class
C. Have access to only the static members of a class
D. Have direct access to all other class members also
Show Correct Answer
Correct Answer is :
Have access to only the static members of a class
5. The static member functions __________________
A. Have access to all the members of a class
B. Have access to only constant members of a class
C. Have access to only the static members of a class
D. Have direct access to all other class members also
Show Correct Answer
Correct Answer is :
Have access to only the static members of a class
6. The static member functions ____________________
A. Can be called using class name
B. Can be called using program name
C. Can be called directly
D. Can’t be called outside the function
Show Correct Answer
Correct Answer is :
Can be called using class name
7. The static member functions ____________________
A. Can be called using class name
B. Can be called using program name
C. Can be called directly
D. Can’t be called outside the function
Show Correct Answer
Correct Answer is :
Can be called using class name
8. Which is correct syntax to access the static member functions with class name?
A. className . functionName;
B. className -> functionName;
C. className : functionName;
D. className :: functionName;
Show Correct Answer
Correct Answer is :
className :: functionName;
9. Which is correct syntax to access the static member functions with class name?
A. className . functionName;
B. className -> functionName;
C. className : functionName;
D. className :: functionName;
Show Correct Answer
Correct Answer is :
className :: functionName;
10. Which among the following is not applicable for the static member functions?
A. Variable pointers
B. void pointers
C. this pointer
D. Function pointers
Show Correct Answer
Correct Answer is :
this pointer
11. Which among the following is not applicable for the static member functions?
A. Variable pointers
B. void pointers
C. this pointer
D. Function pointers
Show Correct Answer
Correct Answer is :
this pointer
12. Which among the following is true?
A. Static member functions can’t be virtual
B. Static member functions can be virtual
C. Static member functions can be declared virtual if it is pure virtual class
D. Static member functions can be used as virtual in Java
Show Correct Answer
Correct Answer is :
Static member functions can’t be virtual
13. Which among the following is true?
A. Static member functions can’t be virtual
B. Static member functions can be virtual
C. Static member functions can be declared virtual if it is pure virtual class
D. Static member functions can be used as virtual in Java
Show Correct Answer
Correct Answer is :
Static member functions can’t be virtual
14. The static members are ______________________
A. Created with each new object
B. Created twice in a program
C. Created as many times a class is used
D. Created and initialized only once
Show Correct Answer
Correct Answer is :
Created and initialized only once
15. The static members are ______________________
A. Created with each new object
B. Created twice in a program
C. Created as many times a class is used
D. Created and initialized only once
Show Correct Answer
Correct Answer is :
Created and initialized only once
16. Which among the following is true?
A. Static member functions can be overloaded
B. Static member functions can’t be overloaded
C. Static member functions can be overloaded using derived classes
D. Static member functions are implicitly overloaded
Show Correct Answer
Correct Answer is :
Static member functions can’t be overloaded
17. Which among the following is true?
A. Static member functions can be overloaded
B. Static member functions can’t be overloaded
C. Static member functions can be overloaded using derived classes
D. Static member functions are implicitly overloaded
Show Correct Answer
Correct Answer is :
Static member functions can’t be overloaded
18. The static member functions _______________
A. Can’t be declared const
B. Can’t be declared volatile
C. Can’t be declared const or volatile
D. Can’t be declared const, volatile or const volatile
Show Correct Answer
Correct Answer is :
Can’t be declared const, volatile or const volatile
19. The static member functions _______________
A. Can’t be declared const
B. Can’t be declared volatile
C. Can’t be declared const or volatile
D. Can’t be declared const, volatile or const volatile
Show Correct Answer
Correct Answer is :
Can’t be declared const, volatile or const volatile
20. Which keyword should be used to declare the static member functions?
A. static
B. stat
C. const
D. common
Show Correct Answer
Correct Answer is :
static
Similar Interview Questions
Search for latest jobs
Find Jobs