2080 12

BIT153 ยท 2080 ยท 5 marks

Illustrate the use of static variable with a simple program.

Illustrate the use of static variable with a simple program. [5]

Object Oriented ProgrammingChapter 4: Pointers, References, and Memory ManagementStatic data members and static functions

A static variable is a variable that retains its value between function calls. It is initialized only once (at the first call) and exists for the entire lifetime of the program, even though its scope may be local to a function. --- Property Description ------ Initialization Done only once Lifetim...