183k views
4 votes
Write query to display 5 characters from the 2 nd left character onwards of the string ‘Practices'.

1 Answer

5 votes

The following code is in C++

#include<iostream>

using namespaces std;

int main( ){

char c[] = "Practices";

for( int i =1 ; c[i] != '\0' ; c++ )

{

cout<<c[i];

}

return 1;

}

The following code will print : ractices .

Hence, this is the required solution.

User Warren Blanchet
by
5.2k points