0

Escape sequence

https://code.sololearn.com/clfk1KLBWvVp/?ref=app I want the output something like this - { question: "fhjj bjjj", options: ["gh", "gh", "kg", "ok"], correctAns: 2 } But in my code why the lines broke before the end quotation mark of each string. Enter this input - This is a question Ab Bc Cd Da 2

3rd Apr 2021, 8:52 PM
Kashyap Kumar
Kashyap Kumar - avatar
1 Resposta
+ 1
You need to remove the '\n' character from the input value for each of your inputs. What is actually input. "This is a question\n" "Ab\n" etc... So, opt[0] = { 'A', 'b', '\n', '\0'}
3rd Apr 2021, 10:02 PM
ChaoticDawg
ChaoticDawg - avatar