Which of the following type of data member can be shared by all instances of a class?
Correct Answer: static
Explanation:
Note: This Question is unanswered, help us to find answer for this one
C++ Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More C++ MCQ Questions
What is a function template?
Every object in the array receives a destructor call, always delete memory allocated as an array with operator ___.
Which statement is incorrect?
Which access specifier is used in a class definition by default?
Which gets called when an object goes out of scope?
Which is valid declaration or definition of a pointer?
Which of the following statements are true about conversions in C++? (Choose all that apply.)
Code will exhibit undefined behavio What will be the result of calling the h() function in the following C++ code? const char* upwork[] = { "Freelancers", "Projects", "Fixed", "Hourly" } const char* f(inti) { return upwork[i]; } void g(string s){} void h() { const string& r = f(0); g(f(1)); string s = f(2); cout<< "f(3): " << f(3) << " s: " << s << " r: " << r << '\n'; }
This code: template void Kill(T *&objPtr) { delete objPtr; objPtr = NULL; } class MyClass { }; void Test() { MyClass *ptr = new MyClass(); Kill(ptr); Kill(ptr); } Invoking Test() will cause which of the following?
Cannot read /proc//mem file even with root privilege due to permission error. How to solve it? intmem_file = open(“/proc/12345/mem”, O_RDONLY); // returns permission error