Q62
What will be the output of the following C++ code? #include #include #include using namespace std; int main () string str ("Steve jobs"); char * cstr = new char [str.length() + 1]; strcpy (cstr, str.c_str()); char * p = strtok (cstr," "); while (p != 0) cout << p << ' '; p = strtok(NULL," "); delete[] cstr; return 0;
A.
Steve jo
B.
Steve jobs
C.
Steve
jobs
Answerjobs
D.
Error
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board