There is no scanf in Java. It is one of the keywords used in C Programming language
Chat with our AI personalities
scanf ("%[^\n]s", sentence);
scanf is a function, not a statement. Example: int a; char name[12]; scanf ("%d %s", &a, &name[0]);
scanf: scanf is a built-in function to read input from the user.
Use '%s', eg: char name[64]; scanf ("%s", name);
int printf (const char *fmt, ...)orint scanf (const char *fmt, ...)