Tuesday, September 15, 2015

Learning C - print your name

#include <stdio.h>
#include <conio.h>

void main()
{
                clrscr();
                char name[20];
                printf("Enter your name ");
                scanf("%s",&name);
                printf("Hi %s, glad to meet you. ",&name);
                getch();
}


Output: Hi (your name) glad to meet you.

No comments:

Post a Comment