WAP to accept first name,middle name & last name of a
student display its initials?

Answer Posted / chandan kumar r

#include<stdio.h>
#include<conio.h>
void main()
{
char fname[20],mname[20],lname[20];
clrscr();
print("Enter student First Name: ");
scanf("%c",fname);
print("Enter student Middle Name: ");
scanf("%c",mname);
print("Enter student Last Name: ");
scanf("%c",lname);
print("The Output of the Following is: \n");
printf("%c %c %c",fname[0],mname[0],lname[0]);
getch();
}

Is This Answer Correct ?    20 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is hashing in c language?

609


What are enums in c?

654


4. main() { int c=- -2; printf("c=%d",c); }

1364


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2261


1234554321 1234 4321 123 321 12 21 1 1 12 21 123 321 1234 4321 1234554321

3136






Is there any data type in c with variable size?

628


What is the difference between typedef struct and struct?

592


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

2570


What are the difference between a free-standing and a hosted environment?

735


What is define c?

568


What is context in c?

536


Write the control statements in C language

644


What is null pointer in c?

589


Difference between constant pointer and pointer to a constant.

607


How can you determine the maximum value that a numeric variable can hold?

633