Run ❯
Get your
own
website
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
#include
#include
using namespace std; int main() { char myStr[] = "Hello World"; char * myPtr1 = strchr(myStr, 'o'); char * myPtr2 = strrchr(myStr, 'o'); cout << "First: " << myPtr1 << "\n"; cout << " Last: " << myPtr2 << "\n"; return 0; }
First: o World
Last: orld