We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main() {
// Declare a variable named 'input_string' to hold our input.
char input_string[105];
// Read a full line of input from stdin and save it to our variable, input_string.
scanf("%104[^\n]", input_string); // Read until a newline is encountered
// Print a string literal saying "Hello, World." to stdout using printf.
printf("Hello, World.\n");
// Print the contents of input_string to stdout.
printf("%s\n", input_string);
return 0;
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 0: Hello, World.
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
int main() { // Declare a variable named 'input_string' to hold our input. char input_string[105];
}