PLEASE NOO SPAMM
Write a program to input a full name with any number of middle names and display all the initials and the full sir name.
Answers
Answered by
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:
Similar questions