Hello, I am a beginner in C programming and would like help with this small piece of code. It is supposed to ask you your name and then repeat it back to you:
When executing the program, it just says "Hello, 0" when you type in letters. when you type in numbers it says hello and then the number.Code:#include <stdio.h> #include <stdlib.h> int main() { char (num); printf("Hello, what is your name? "); scanf("%d" ,&num); printf("Hello %d.", num); }