Class Programs

C++ Simple Program of Static Data Member

Program of Static Data Member

C++ Simple Program of Static Data Member.Static member are initilized to zero when object of its class is created.Also only one copy of that member is created for the entire class.It is only visible within the class.

Program

OUTPUT:-

Static Data Member


Comment below if you are facing any problem


Also read

C++ Program to add two numbers by defining function Outside the class
C++ program to print 3×3 matrix using class
C++ program to print alternate elements from an array


Summary
C++ Simple Program of Static Data Member
Article Name
C++ Simple Program of Static Data Member
Description
Static member are initilized to zero when object of its class is created.Also only one copy of that member is created for the entire class.It is only visible within the class.
Author
Publisher Name
Scanfcode
Publisher Logo