Read the question, write C on the right, then Run or Check.
QuestionHint and solution stay closed until you open them
Read a single word name and print Hello, <name>!
Input. One word.
Output. Hello, name!
Examples
Input
Ada
Output
Hello, Ada!
Input
World
Output
Hello, World!
Hint
- printf("Hello, %s!\n", name);
Show correct code
Peek only after you have tried. You can still Check your own version.
#include <stdio.h>
int main(void) {
char name[64];
if (scanf("%63s", name) != 1) return 1;
printf("Hello, %s!\n", name);
return 0;
}
main.cC17 · gcc · Ctrl + Enter runs
ResultIdle
Run to see output. Check grades the tests.