Home / MCQ Bank / Computer
Computer Declaration And Access Control Difficulty: Medium

Which access modifier restricts a class member's visibility only to the same class and its subclasses?

Select the correct option to test your answer:

More Computer Questions

How can we delete all files in a directory? What is "a" in the given C code? size_t wcstombs(char *s, const wchar_t *a, size_t n) Telnet is a . . . . . . . . based computer protocol. What will be the output of the following C++ code? #include <iostream> #include <vector> #include <forward_list> using namespace std; int main() { forward_list<int> fl1 = {1,2,3,4,5}; for (int&c : fl1) cout << c << " "; cout<<endl; forward_list<int>::iterator ptr = fl1.begin(); fl1.erase_after(ptr); for (int&c : fl1) cout << c << " "; cout<<endl; return 0; } puts() function adds newline character.