Комментарии:
nice, thanks
ОтветитьHii its me again :P
I have a situation where i have to copy the end of the string instead of the first few characters of the string, how can I do it?
Eg. you input into the terminal going './bin/library bin/books.txt' but i just need the 'bin/books.txt' bit to be used inside a fopen() function, and the .txt file could be another file name with longer characters, so how can I make it possible? Thank you!
Nice - thank you Kevin.
ОтветитьWhat compiler do you use like in general the app you use
Ответитьstrlcpy()? strcpy_s()?
ОтветитьThankyou so much
Ответитьthank you so much. please I have a question how we can use all that using the pointers ?
Ответитьthanks kevin well explained 🙂
ОтветитьThank you so much. You are a life saver, man.
ОтветитьWhy the code below doesn't produce any error? I use 9 as the size of the destination string even though I have to specify 10 or more (because of the \0 character)
char src[] = "12346789";
char dest1[9];
printf("%s",strcpy(dest1,src));
Good video, but it doesn't contain enough information to rebuild strncpy(); yourself.
ОтветитьWe have to put 10 characters in src[10 ] because we count from 0 so we can put our 10 characters and \0 will put at 10 (11)
ОтветитьHello. I've been using DevC++ and a terminal (in CodeChum), and then when I tried:
char src[10] = "123456789";
char dest2[5];
strcpy (dest2, src);
printf ("%s", dest2);
return 0;
They are still printing the exact 123456789. How could have this happened? Help please.
Mr.Portfolio Courses. I have 12345678, how a can copy only 3456 ????
ОтветитьPerfect! Thank you very much!
ОтветитьHi! What’s the editor?
Ответить