0

Seperation of string characters in C

Helpppp

12th Nov 2021, 5:20 AM
Bharath
2 Answers
+ 2
Please consider rephrasing your query. As it is now, it is unclear what you mean to ask. It would be nice if you can attach a link to your tryout code in the post's Description so people can review it to better understand your situation. https://www.sololearn.com/Discuss/333866/?ref=app https://www.sololearn.com/post/75089/?ref=app https://code.sololearn.com/W3uiji9X28C1/?ref=app
12th Nov 2021, 5:55 AM
Ipang
0
Barath: strings in C are am array of variables type char. char* hello = "Hello World!" They end with a special char '\0' that indicates the end of the string. All this is equal to. hello[0] = 'H' hello[1] = 'e' hello[2] = 'l' hello[3] = 'l' hello[4] = 'o' hello[5] = '\s' //a special case for space hello[6] = 'W' .... hello[12] = '\0' Now working with the array and char variables you can split the string. Read K&R C Programing version two. You can download it. It's a bit dated but a simple book to follow to learn C.
12th Nov 2021, 12:49 PM
William Owens
William Owens - avatar