Detailed Print – Computer Sir Ki Class

Login


Lost your password?

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


Shop
siteicon
Solved Problem#CPP#6944

Problem Statement - 01B-2019S

Write the names of the correct header files, which must be included in the following C++ code to compile the code successfully:

void main ()
{
  char L[]="CS 2018";
  int N=strlen(L);
  cout<<L[N-1];
}

Solution

Click to open popup

Solved Problem Understanding

iostream.h (required for cout)

string.h (required for strlen)