Program is to define a class as student, C/C++ Programming

Program is to define a class as student:

Program is to define a class as student and display the records specific depending upon the number

class student



   int roll,i;

   char name[20],grade;

   float per;

   int marks[5],total;

  int calculate()



     return per;



    student()// constructor assigning initial values




    void input();

    void disp();

   // void disp_spe();



 void student::input()


   cout<<" enter your name "<


   cout<<" enter your roll no. "<


   cout<<" enter the marks of five subjects "<

   for (i=0;i<=4;i++)






  void student::disp()



    cout<<" R E P O R T   C A R D "<<"\n\n";

    cout<<" The name is : "<

    cout<<" The marks of all subjects is :"<<"\n";

     for (i=0;i<=4;i++)





    cout<<" The percentage is :"<


                cout<<" The grade is : A";

     else if(per>40)

                cout<<" the grade is : D";


                cout<<" The grade is : B";



  void student::disp_spe()


     int rollno;

     cout<<" enter the  students roll no. you want report card "




  void main()



   student *data;

   data=new student;




   delete data;


Posted Date: 10/19/2012 5:32:00 AM | Location : United States

Related Discussions:- Program is to define a class as student, Assignment Help, Ask Question on Program is to define a class as student, Get Answer, Expert's Help, Program is to define a class as student Discussions

Write discussion on Program is to define a class as student
Your posts are moderated
Related Questions
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

When I develop a destructor, do I require to explicitly call the destructors for my member objects?

Write a program to illustrate array of structures? struct customer { int id; char name[15]; }; struct customer c[100]; . In the above instance, the array of Structures is

padovan string generation till 40

The #define Directive The #define directive explains a macro which is a text string represented by a name. Whenever the pre-processor finds this name in the program, it is repl

#padovan string in java   program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class PadovanStrin

Does improper inheritance have a potential to wreck a project? Many projects meet a dead end due to bad inheritance. Hence it certainly has potential to wreck a project. Sma

what would be the best tool for debuggingg memory leaks in c/c++ programming

What are  P r im a r y D a t a T y p es? Integer can be defined according to the size of the data and it can be modified further by using keyword unsigned and si