My issue
int main() {
char x[100]; // Declare a string variable
// Accept user input
printf("Enter your name: ");
scanf("%99s", x); // Read input safely
// Output the greeting
printf("Hello %s\n", x);
return 0;
}
My code
#include <stdio.h>
int main() {
char x[100]; // Declare a string variable
// Accept user input
printf("Enter your name: ");
scanf("%99s", x); // Read input safely
// Output the greeting
printf("Hello %s\n", x);
return 0;
Learning course: Programming and Problem solving using C
Problem Link: https://www.codechef.com/learn/course/ciet-programming-c/CIETPC13/problems/CLB058