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
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
how to write optimum code to divide a 50 digit number with a 25 digit number??
What is the difference between procedural and functional programming?
If you know then define #pragma?
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
When should we use pointers in a c program?
What does printf does?
In C programming, how do you insert quote characters (‘ and “) into the output screen?
What is function what are the types of function?
Explain low-order bytes.
What is sizeof array?
What is operator promotion?
How can a string be converted to a number?
What does %p mean?
What are the similarities between c and c++?