+ 17

Formatted output in C

How can i control formatting output like that 👇 Suppose that i received input from the user like that 978-0–393-97950-3 and i want to output it like that 👇 F1: 978 F2:0 F3:393 etc. ???

23rd Apr 2020, 12:44 PM
Ahmed Mahmoud
Ahmed Mahmoud - avatar
1 Odpowiedź
+ 3
Learn about to split function strtok() in c. Take input as string.. And strtok(input, "-") will split into word, splitting by - token.. See this for refference :. https://www.educative.io/edpresso/splitting-a-string-using-strtok-in-c
23rd Apr 2020, 12:53 PM
Jayakrishna 🇮🇳