WAP to accept first name,middle name & last name of a
student display its initials?
Answer Posted / chandan kumar r
#include<stdio.h>
#include<conio.h>
void main()
{
char fname[20],mname[20],lname[20];
clrscr();
print("Enter student First Name: ");
scanf("%c",fname);
print("Enter student Middle Name: ");
scanf("%c",mname);
print("Enter student Last Name: ");
scanf("%c",lname);
print("The Output of the Following is: \n");
printf("%c %c %c",fname[0],mname[0],lname[0]);
getch();
}
| Is This Answer Correct ? | 20 Yes | 17 No |
Post New Answer View All Answers
What is substring in c?
Is there any data type in c with variable size?
What is the use of ?
What is null pointer constant?
Why do we use header files in c?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
Explain can the sizeof operator be used to tell the size of an array passed to a function?
Do you know the purpose of 'register' keyword?
Explain how do you list files in a directory?
What are dangling pointers? How are dangling pointers different from memory leaks?
Is sizeof a keyword in c?
What math functions are available for integers? For floating point?
What is operator promotion?
What is the difference between functions abs() and fabs()?