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
Explain the use of 'auto' keyword
Why do we use int main?
State the difference between realloc and free.
What is the difference between fread and fwrite function?
Explain the use of fflush() function?
Differentiate Source Codes from Object Codes
What is n in c?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What is wild pointer in c with example?
Why dont c comments nest?
Explain the use of #pragma exit?
Can we compile a program without main() function?
What does c mean before a date?
What does the error 'Null Pointer Assignment' mean and what causes this error?