What is the difference between access modifier, modifier and qualifier?

It's a competition exam question. and is a very important question from exam point of view. plz help me to get the answer of this question.

Access modifier help in achieving Data Hiding in OOPS, it prevent the function of a program to directly access the member of a class, in C++ there r three typr of access modifire labeled as "public, private and protected"

Modifier help in modifying the predefined meaning of built-in data type and expand them to a much larger set. There are 4 data type modifiers in c++ :- "long" , "sort" , "signed" and "unsigned". These all 4 can be applied to int type,in addition "signed" and "unsigned" can be applied to char, and "long" can be applied to double.

Qualifiers add extra "Meaning/Quality" to identifier, there r three type of Qualifier:- "const", "volatile" and "restrict".
const:- Object of type const cannot be changed by your program during execution.
volatile:- It tell the compiler that a variable's value may be changed in ways not explicitly specified by the program, so its value is not stored in the register, so whenever requested system read the current value from the memory location.

restrict:- when two pointer r declared as restrict , it ask the compiler not to optimize them and treat them as two different pointer

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.