KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
lets say i have 2 strings char str_cp[50],str[50]; str[]="how are you" and i want to put the second word ex "are" into another string named str_cp so if i use printf("%s ,%s",str,str_cp); will be like how are you are how can i do that? (i tried strncpy function but it can copy only specific characters from beggining of the string ) is there any way to use a pointer which points at the 4th character of the string and use it in the strncpy function to copy the first 3 characters but the beggining point to be the 4th character ?
Tags (comma-separated)
Save Edits
Cancel