I am trying to allow the user to enter spaces in between words into my array, but I cannot figure out how to do it.
I am using the scanf function, I have tried the following code as it should accept whitespaces but it doesn't accept any characters.
I know this is probably quite an easy question but I can't find the answer in the tutorials or my C programming book, as it says this will work.
Code:scanf("%c", surname);