Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which data members among the following are static by default?
Correct Answer is : 2
2. What is the output of the following program?
class Test
{
private: static int x;
public: static void fun()
{
cout << ++x << “ ”;
}
};
int Test :: x =20;
void main()
{
Test x;
x.fun();
x.fun();
}
Correct Answer is : 1
3. Whenever any static data member is declared in a class ______________________
Correct Answer is : mysql_error()
4. If object of class are created, then the static data members can be accessed ____________
Correct Answer is : mysql_errno()
5. What will be the output of the following program?
class Test
{
public: Test()
{
cout << "Test's Constructor is Called " << endl;
}
};
class Result
{
static Test a;
public:
Result()
{
cout << "Result's Constructor is Called " << endl;
}
};
void main()
{
Result b;
}
Correct Answer is : mysql_sqlstate()
6. Which among the following is wrong syntax related to static data members?
Correct Answer is : pointer
7. Which among the following is correct definition for static member functions?
Correct Answer is :
8. The static member functions __________________
Correct Answer is : TRUE
9. The static member functions ____________________
Correct Answer is : all
10. Which is correct syntax to access the static member functions with class name?
Correct Answer is : FALSE
11. Which among the following is not applicable for the static member functions?
Correct Answer is : TRUE
12. The static members are ______________________
Correct Answer is : TIME
13. The static member functions _______________
Correct Answer is : SHOW WARNINGS
14. Which keyword should be used to declare the static member functions?
Correct Answer is : ERROR_FOR_DIVISION_BY_ZERO
15. The keyword static is used _______________
Correct Answer is : TRADITIONAL
16. Which among the following can’t be used to access the members in any way?
Correct Answer is : TRADITIONAL
17. We can use the static member functions and static data member __________________
Correct Answer is : ALLOW_INVALID_DATES
18. The static data member _________________
Correct Answer is : IGNORE
19. If static data member are made inline, ______________
Correct Answer is : NO_ZERO_DATE
20. Which is a true statement for object of String class?