Basic computer course, C programming language, Education, Engineering Course, Engineering Courses, Maths Coaching, online computer coaching, PGDCA course coaching, programming course, school computer coaching, training, Uncategorized, Web Design course

Class and Object-tccicomputercoaching.com

Class is a user defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class. A class is like a blueprint for an object.

Introduction-to-C-Programming

The data and functions within a class are called members of the class.

For example,

class student

{

int rn;

float per;

void print()

{

cout<<“The per of rn “<<rn<<“is”<<per;

}

};

void main()

{

student s;

s.rn=10;

s.per=76.8;

s.print();

}

O/P : The per of rn 10 is 76.8

To learn more about Class and Object in detail.

Join TCCI in Bopal and Satellite in Ahmedabad.

Call us @ 9825618292

Visit us @ http://tccicomputercoaching.com/course/

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s