Access specifiers are followed by

[amp_mcq option1=”a comma” option2=”a semicolon” option3=”a colon” option4=”two colons” correct=”option1″]

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.

Exit mobile version