What is a class?

What is a class?

Class:-
        Classes are declared using the keyword class. The declaration takes the form:

[attributes] [modifiers] class identifier [:base-list] { class-body }[;]
where: 

attributes (Optional) 
:-Additional declarative information.  
modifiers (Optional):-
The allowed modifiers are new, abstract, sealed, and the four access modifiers. 
identifier:- 
The class name. 
base-list (Optional) 
:-A list that contains the one base class and any implemented interfaces, all separated by commas. 
class-body 
:-Declarations of the class members. 

Example:-
   Public class a
{
// some members and parameter

}

By:kamal
Date:2013-10-10 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Links

C interview questions and answers for experienced and fresher