All Questions
2 questions
0
votes
1
answer
191
views
C - How to split a string with delimiter when sometimes there are no values between delimiter?
I am trying to split a string as follows:
1.97E+13,1965.10.30,12:47:01 AM,39.1,23,greece,,,,,10,4.8,4.6,4.6,4.8,4.6,4.7
I am using strtok and giving , as a delimiter but since there are no values ...
1
vote
2
answers
45
views
Segamentation fault encountered while parsing contents of string separated by a delimiter
During an interview, I was asked to implement a solution for following problem in C programming language:
Given an input string with a fixed pattern of contents separated by a delimiter, I need to ...