FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 112   



Following program shows you how to scan name of user and say hello with name
In this program we get name from user using scanf method and prints hello with that name using printf

#include <stdio.h>

int main(void) {
    char name[50];
    printf("Please enter a name:");
    scanf("%s", name);
    printf("Hello %s", name);
}

Output:

Please enter a name: 
 Tom
Hello Tom



On By


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News