WAP to accept first name,middle name & last name of a
student display its initials?
Answer Posted / ricky
hi chandan
this is the modification of ur ans
#include<stdio.h>
#include<conio.h>
void main()
{
char fname[20],mname[20],lname[20];
clrscr();
printf("Enter student First Name: ");
scanf("%s",fname);
printf("Enter student Middle Name: ");
scanf("%s",mname);
printf("Enter student Last Name: ");
scanf("%s",lname);
printf("The Output of the Following is: \n");
printf("%c %c %c",fname[0],mname[0],lname[0]);
getch();
}
Is This Answer Correct ? | 2 Yes | 5 No |
Post New Answer View All Answers
What is the scope of local variable in c?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
How is a pointer variable declared?
What is a nested formula?
What are runtime error?
What are header files and explain what are its uses in c programming?
Explain what will the preprocessor do for a program?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
What is a program flowchart?
What is void pointers in c?
What are the features of the c language?
how do you execute a c program in unix.
Which is the memory area not included in C program? give the reason
Can main () be called recursively?
What is the role of && operator in a program code?