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

Answer Posted / ricky

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

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of 'auto' keyword

859


Why do we use int main?

819


State the difference between realloc and free.

804


What is the difference between fread and fwrite function?

812


Explain the use of fflush() function?

815






Differentiate Source Codes from Object Codes

1106


What is n in c?

777


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

791


process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,

2116


What is wild pointer in c with example?

756


Why dont c comments nest?

813


Explain the use of #pragma exit?

887


Can we compile a program without main() function?

846


What does c mean before a date?

821


What does the error 'Null Pointer Assignment' mean and what causes this error?

950