c program for reading comma separated text
c program to separate comma separated string
Program 1:-
c program for reading comma separated string using sscanf function
Output:-
GPS:GPRMC
latitude:85750.0000
valid:ABC
longitude:1303.7882
Note:-
The ^ is a escape sequel, [^,] is used to read string and skip comma(,)
Program 2:-
c program for reading comma separated string using switch function
Output:-
GPS:GPRMC
latitude:85750.0000
valid:ABC
longitude:1303.7882
GPS:GPRMC
latitude:85750.0000
valid:ABC
longitude:1303.7882
Leave reply
Add your comments here