Skip to content

C-Program 1

WRITE A PROGRAM to display your name. Write another program to print message
with inputted name.

#include<stdio.h>  
void main()  
{
  char name[20];
  printf("Sagar \n");
  printf("Enter Your Name : "); 
  scanf("%s",&name);  
  printf("Your name is : %s", name);  
  getch();   
}

Output