How can I get the "not to" string and removing the "To be or" and the last "be"? What should I do?
Code:#include<stdio.h> #include<conio.h> #include<string.h> int main(void) { char str1[]= "To be or not to be"; char str2[6]; strncpy (str2,str1,5); str2[5]='\0'; puts (str2); getch(); return 0; }



LinkBack URL
About LinkBacks



