Described storage qualifiers in c++ ?, C/C++ Programming

A: They are following:

Const: point out that memory once initialized, must not be modify through a program.

Volatile: denote that value in the memory location can be modified although nothing in the program code changes the contents. For instance: if you have a pointer to hardware location which contains the time, where hardware modifies the value of this pointer variable and not the program. The intent of this keyword is to get better optimization capacity of the compiler.

Mutable: Denote that particular member of a class or structure can be changed even if a particular structure variable, class, or class member function is constant.

struct data


char name[80];

mutable double salary;


const data MyStruct = { "Satish Shetty", 1000 };

//initlized by complier

strcpy (, "Shilpa Shetty"); // compiler error

MyStruct.salaray = 2000 ; // complier is happy allowed


Posted Date: 3/21/2013 7:25:56 AM | Location : United States

Related Discussions:- Described storage qualifiers in c++ ?, Assignment Help, Ask Question on Described storage qualifiers in c++ ?, Get Answer, Expert's Help, Described storage qualifiers in c++ ? Discussions

Write discussion on Described storage qualifiers in c++ ?
Your posts are moderated
Related Questions
Explain the Macros? Preprocessor' is a translation stage that is applied to your source code before the compiler proper gets its hands on it. Usually the preprocessor performs

Need Squid Web Proxy with ffmpeg to convert flv to h.264 Project Description: We need a squid proxy setup with the modification that will transcode FLV to h.264 in real-time,

A: In C, encapsulation was completed by making things static in a compilation unit or module. It prevented another module from accessing the static stuff. (Incidentally, now static

Charity Ball Organizer Many charities support good causes, but one of the difficulties each of them has is organizing their fundraising events. After nearly a semester of C progra

Q: In p = new Fred(), does the Fred memory "leak" if  Fred constructor throws an exception? A: No.         If an exception take place during the Fred constructor of p = new F

write a programme that computes the price of shares and options. do the options in one-period binomial model.

Explain a class to model a banking system. The function members should allow initializing the data members, a query to facilitate for account and a facility to deposit and with

input marks of c and c++ if c grater than equal to 50 grater than 50 you are pass if c greater than equal to 50 c++ less than 50 than supplementry c++ if c less then 50 and c++ gra