New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Project to find out the roll number of the student using c++


Posted Date:     Total Responses: 0    Posted By: shafreen zeba   Member Level: Silver   Points/Cash: 2   


#include
#include

class student//CLASS SPECIFICATION
{
double r; //DECLARATION OF PRIVATE DATA MEMBERS
char name[30];
public:
void set();//DECLARATION OF PUBLIC MEMBER FUNCTIONS
void print()const;//DECLARATION OF PUBLIC CONSTANT MEMBER FUNCTIONS
};

void student::set()//FUNCTION DEFENITION OUTSIDE THE CLASS SPECIFICATION
{
cout<<"\nEnter the roll no.";
cin>>r;
cout<<"\nEnter the name:";
cin>>name;
}

void student::print()const//FUNCTION DECLARATION OUTSIDE THE CLASS SPECIFICATION
{
cout<<"\nName of the student is"< cout<<"\nRoll number of the student is"< }

void main()
{
student s;//CREATING AN OBJECT
clrscr();
cout<<"\n\n\t\tPROGRAM FOR CLASS WITH CONSTANT MEMBER FUNCTION";
s.set();//INVOKING PUBLIC MEMBER FUNCTION BY THE OBJECT
s.print();//INVOKING PUBLIC MEMBER FUNCTION BY THE OBJECT
getch();
}





Output:

Enter the roll number : 1508850
Enter the student name : Chris Fletcher

Name of the student is Chris Fletcher
Roll number of the student is 1508850



Project Feedbacks


No feedbacks found. Be the first to respond and make money from revenue sharing program.

Post Feedback
You must Sign In to post a feedback.
Next Project: project to calculate tax using c++
Previous Project: Project to calculate array size using java

Return to Project Index

Post New Project


Related Projects



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.