Topic Wise Solved Problems Question – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  


Shop
siteicon
CPP: Topicwise Exam Question: data-file-concepts siteicon
File and string related header files 1

The following C++ code during compilation reports errors as follows:
Error: ‘ofstream’ not declared
Error: ‘strupr’ not declared
Error: ‘strcat’ not declared
Error: ‘FIN’ not declared
Write the names of the correct header files, which must be included to compile the code successfully:

void main()
{
  ofstream FIN("WISH.TXT");
  char TEXT2[]="good day";
  char TEXT1[]="John!";
  strupr(TEXT2);
  strcat(TEXT1, TEXT2);
  FIN<<TEXT1<<endl;
}
CBSE12A-2018