a comma
a semicolon
a colon
two colons
Answer is Right!
Answer is Wrong!
The correct answer is: A. a comma.
Access specifiers are followed by a comma. For example, the following code declares a class with a public member function:
class MyClass {
public:
void myFunction();
};
The access specifier “public” is followed by a comma, which is followed by the name of the member function.
The other options are incorrect. Option B, a semicolon, is incorrect because access specifiers are not followed by semicolons. Option C, a colon, is incorrect because access specifiers are not followed by colons. Option D, two colons, is incorrect because access specifiers are not followed by two colons.