Just need help with regards to this part, i'm meant to use scanf() to read a string from keyboard and return number of characters read, so i'm supposed to read a character string. The scan must then terminate at whitespace. A null character is stored at the end
of the string. However, the input string size from a user is arbitrary.
#include <stdio.h> /*Include the standard I/0 header file */
#include <string.h> /*Include the standard I/0 header file string library */
int getInputByscanf(char input[]){
char string[4];
char phrase;
string = scanf("%c", &phrase);
while (string != EOF){
string = scanf("%c", &phrase)
}
System("Pause");
return 0;
}
is this right??