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

Does * p ++ increment p or what it points to?

606


Explain the use of fflush() function?

623


Are c and c++ the same?

623


What are the features of the c language?

640


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5053






What does. int *x[](); means ?

630


State the difference between realloc and free.

625


Is it fine to write void main () or main () in c?

541


What is the difference between pure virtual function and virtual function?

643


What is meant by int main ()?

714


A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9. I need to write a program that takes the cipher from the keyboard and prints the new cipher. I thought of the following: Take the input from the keyboard and put it into a string or an array. Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable. Print the new variable. Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?

1508


What is #include called?

565


Can include files be nested?

623


What are the various types of control structures in programming?

623


Can an array be an Ivalue?

657