//this is a program to accept the user name and display it
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
char name[10];
printf("\n\nEnter Your name: ");
for(i=0;i<10;i++)
{
printf("\n\nEnter the character: ");
scanf(" %c",&name[i]);
}
printf("\n\nDisplaying your name: ");
for(i=0;i<10;i++)
printf("%c",name[i]);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
char name[10];
printf("\n\nEnter Your name: ");
for(i=0;i<10;i++)
{
printf("\n\nEnter the character: ");
scanf(" %c",&name[i]);
}
printf("\n\nDisplaying your name: ");
for(i=0;i<10;i++)
printf("%c",name[i]);
getch();
}