All members of a class are private by default, whereas fields of a struct are public. Default access of a base class is private for classes and public for structures.
For Example
struct Emp {
char Name[20]; // Here Name variable is public
};
struct Emp {
char Name[20]; // Here Name variable is public
};

0 Comments:
Post a Comment