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
Does * p ++ increment p or what it points to?
Explain the use of fflush() function?
Are c and c++ the same?
What are the features of the c language?
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
What does. int *x[](); means ?
State the difference between realloc and free.
Is it fine to write void main () or main () in c?
What is the difference between pure virtual function and virtual function?
What is meant by int main ()?
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?
What is #include called?
Can include files be nested?
What are the various types of control structures in programming?
Can an array be an Ivalue?