Computer Science, asked by dixitseema0123, 5 months ago

write a program in C to type a name and display it​

Answers

Answered by vanshitadiwaker
0

Answer:

#include<stdio.h>

#include<string.h>

void main()

{

int i,h;

char a[10],b[10],c[10];

printf("Enter your first name\n");

scanf("%s",&a[i]);

printf("enter your middle name\n");

scanf("%s",&b[i]);

printf("Enter your last name\n");

scanf("%s",&c[i]);

printf("Displaying your name\n");

printf("%c",a[0]);

printf(".");

printf("%c",b[0]);

h=strlen(c);

for(i=0;i<=h;i++)

{

printf("%c",c[i]);

}

}

Explanation:

Hope it helps

Similar questions