Q:

Rewrite the following program after removing the syntactical error(s) (if any). Underline each correction.

#include[iostream.h]

#include[stdio.h]

class Employee {

 int EmpId = 901;

 char EName[20];

 public:

Employee()  {}

void Joining()

{

cin>>EmpId; gets(EName);

}

void List ()

{

cout<<EmpId<<“:”

 <<EName<<end1;

}

}

void main() {

Employee E;

Joining.E ();

E.List () ;

}

CLASSES

All Replies

Viewing 1 replies (of 1 total)

Viewing 1 replies (of 1 total)

  • You must be logged in to reply to this topic.