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

Answer Posted / ankush

#include<stdio.h>
#include<conio.h>
void main()
{
char fnm[20],snm[10],lnm[10];
clrscr();
printf("Enter student First Name: ");
gets(fnm);
printf("Enter student Middle Name: ");
gets(snm);
printf("Enter student Last Name: ");
gets(lnm);
printf("\nThe Name is: ");
printf("%s %s %s",fnm,snm,lnm);
getch();
}

Is This Answer Correct ?    12 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the sizeof () operator?

594


What are shell structures used for?

580


State two uses of pointers in C?

613


Explain Function Pointer?

660


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

4510






How is a pointer variable declared?

568


Is stack a keyword in c?

608


Explain data types & how many data types supported by c?

562


Why pointers are used in c?

564


What is the use of ?

595


What is wrong with this initialization?

564


How many parameters should a function have?

636


What are the 5 types of inheritance in c ++?

544


How do you define structure?

536


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1230