Good Evening
22:48 pm

Sponsor Area

Sponsor Area

Question is

Anil typed the following C++ code and during compilation, he found four errors as follows:

(i) Function strlen should have a prototype
(ii) Undefined symbol cout
(iii) Undefined symbol endl
(iv) Function getchar should have a prototype

On asking his teacher told him to include necessary header files in the code. Write the names of the header files, which Anil needs to include, for successful
compilation and execution of the following code :

void main()
{
      char S[] = 'Hello';
      for(int i = 0; i<strlen(S); i++)
      S[i] = S[i]+1;
      cout<<S<<end1;
      getchar();
}

Mock Test Series

Sponsor Area

Sponsor Area

NCERT Book Store

NCERT Sample Papers

Entrance Exams Preparation