हिंदी

Anil Typed the Following C++ Code and During Compilation, He Found Three Errors as Follows : 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

Advertisements

प्रश्न

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

1) Function strlen should have a prototype

2) Undefined symbol cout

3) Undefined symbol endl

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 Txt[] = "Welcome";
    for(int C= 0; C<strlen(Txt); C++)
       Txt[C] = Txt[C]+ 1;
    cout<<Txt<<endl;
}
Advertisements

उत्तर

#include

#include

shaalaa.com
Header File - fstream.h
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2016-2017 (March) All India Set 4
Advertisements
Share
Notifications



      Forgot password?
Use app×