In order to do what your intending, You need to use scanf and have a predetermined amount of characters you want between the string. This will construct a string the keeps literal quotes and a null character at the end, so the string can be reprinted.
In order to do what your intending, You need to use
scanf
and have a predetermined amount of characters you want between the string. This will construct a string the keeps literal quotes and a null character at the end, so the string can be reprinted.to take in the string "task 1", you need 6 characters to be read between the quotes, which is reflected above.