what does it mean to declare a member variable as a static, C/C++ Programming

Assignment Help:

b) The static keyword let a variable to maintain its value among distinct function calls.

If the value of a static variable alters while the variable has been accessed, variable keeps the new value. If the identical variable gets accessed again, it would be storing its most recent value. It is possible because, while the static variable is declared, the compiler employee a separate memory area to hold it. By doing this, while the value of the static variable gets altered, it is updated in the memory it is occupying. And since this memory is separate, the compiler can check its values even whilst its function exits.

 


Related Discussions:- what does it mean to declare a member variable as a static

Define passing by reference?, A: Method of passing arguments to a function ...

A: Method of passing arguments to a function that takes parameter of type reference.  for instance: void swap( int & x, int & y ) { int temp = x; x =

Define the increment and decrement operators in c language, Define the Incr...

Define the Increment and Decrement Operators in c language? C offers two special operators -and ++ called decrement and increment operators respectively and these are unary ope

Explain destructors, Destructors A destructor function gets implemented...

Destructors A destructor function gets implemented whenever an instance of the class to which it belongs goes out of existence. The primary usage of a destructor function is

Required audio expert in c# - create audio engine, Project Description: ...

Project Description: We want an EXPERT CODER to help us create an 'audio engine' in C#. We want to be able to specify an input of a wave/MP3 file, and have the engine manipul

Define the multi dimensional arrays, Define the Multi Dimensional Arrays? ...

Define the Multi Dimensional Arrays? Consequently far we have considered arrays with only one dimension. It is as well possible to define an array which is having a 2-dimension

How to make a triangle number, i wont to make triangle with number but numb...

i wont to make triangle with number but number from the largest possible number to 01 (reversed).

Determining the monthly payment on a mortgage loan, The following is the fo...

The following is the formula that can be used to complete that calculation: Monthly Payment = Monthly Interest Rate / (1 - (1 + Monthly Interest Rate) -Payment Interval )) *

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