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 the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2101


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

837


What is meant by type casting?

801


All technical questions

1711


Define Array of pointers.

814






List out few of the applications that make use of Multilinked Structures?

1688


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

985


What is a macro, and explain how do you use it?

792


Can a program have two main functions?

816


Is sizeof a keyword in c?

742


What is the concatenation operator?

784


Why c is procedure oriented?

767


Why void main is used in c?

757


What is define c?

755


Explain which function in c can be used to append a string to another string?

801