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
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What is "Hungarian Notation"?
Was 2000 a leap year?
How can I insert or delete a line (or record) in the middle of a file?
What is the basic structure of c?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
If null and 0 are equivalent as null pointer constants, which should I use?
Tell me is null always defined as 0(zero)?
What is your stream meaning?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
Explain what is the heap?
What is the use of getch ()?
What are the disadvantages of external storage class?
What is identifiers in c with examples?