C++ program to display student information using class

 

Sample Input
Enter Name:Bikash
Enter Regdno.:123
Enter Branch:CS
Enter Sem:5
Sample Output
Name:Bikash
Regdno.:123
Branch:CS
Sem:5

You may also like...

  • divya

    explain the same program using constructors

    • Adil Shafique

      hye .so simple just take the same name function but different parameter .. like
      class sum
      {
      public:
      sum(int x,int y)
      {
      cout<<x+y;
      }
      sum(int x,int y,int z)
      {
      cout<<x+y+z;
      }
      };
      void main()
      {
      sum(5,6),sum(4,6,5);
      getch();
      }