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

Assignment Help:

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 ( MyStruct.name, "Shilpa Shetty"); // compiler error

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

 


Related Discussions:- Described storage qualifiers in c++ ?

Write a program that illustrate creation of a data file, Write a Program th...

Write a Program that illustrate creation of a data file? Here is a program to generate a Fibonacci series and write it into a Data file. # include main() { FILE *fpt;

C program to check display days and months , C program to check display ...

C program to check display days and month main() {           int months, days;           clrscr();           printf("ENTER DAYS: ");           scanf("%d", &days);

Padovan string, a padovan string p(n) for a natural number n is defined a...

a padovan string p(n) for a natural number n is defined as p(0)=''x'' p(1)=''y'' p(2)=''z'' p(n)=p(n-2)+p(n-3),n>2

Super ascii string cost, want the codings for these topic in ur experts min...

want the codings for these topic in ur experts minds.com

Described overriding?, In order to override a method, a subclass of the cla...

In order to override a method, a subclass of the class which originally declared the method have to declare a method along with the same name, return type (or a subclass of that re

Visual c++, i want write visuaL c++ FOR MY ALGORITHM

i want write visuaL c++ FOR MY ALGORITHM

Reverse digit function, how can i write reverse digit function like writing...

how can i write reverse digit function like writing 1234 and printing 4321

Areaundercurve.c, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve betw   Solution:

Gross pay, Develop a C++ program that uses a while to determine the gross p...

Develop a C++ program that uses a while to determine the gross pay (in Dollars) for each of several employees. The company pays “straight-time” for the first 40 hours worked by eac

Algorithms, algorithm to find out all the factors of given positive integer...

algorithm to find out all the factors of given positive integers

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd