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 malloc return c?
What is the difference between mpi and openmp?
Why is this loop always executing once?
What does calloc stand for?
What is a file descriptor in c?
What is variable declaration and definition in c?
What is cohesion in c?
Write a program of advanced Fibonacci series.
Explain 'bus error'?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What does the && operator do in a program code?
Which is better between malloc and calloc?
Why header files are used?
How is a structure member accessed?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.