Saved Bookmarks
| 1. |
Write a program in C++ to copy one string to another without using strcpy() function. |
|
Answer» #include using name space std; intmain() { charstr [ ] = “computer”; char * sptr; sptr = str; cout<< str<< endl; cout<< sptr<< endl; } This code copies the string str to sptr; |
|