© 2014 Firstsoft Technologies (P) Limited. login
Hi 'Guest'
Home SiteMap Contact Us Disclaimer
enggedu
Quick Links
Easy Studies

Home Lab Exercise Object Oriented Programming Lab Exercise ProgramsCPP Program For Declaring Static Members as Class Member▼


CPP Program For Declaring Static Members as Class Member

Alogarithm steps:

  1. Start the program
  2. Create the static class and declare the static data members in the class
  3. Declare the static member function
  4. Create the object for the static class
  5. Pass the static data value when we call the static member function in the main program
  6. Compile and execute the program

CPP Program For Declaring Static Members as Class Member

#include class static_type { static int i; public: static void init(int x) { i = x; } void show() { cout<

SAMPLE INPUT AND OUTPUT:

 100
1000
1000

 
SLogix Student Projects

⇓Student Projects⇓
⇑Student Projects⇑
bottom