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


Please Help Members By Posting Answers For Below Questions

What is the use of ?: Operator?

655


Why is it usually a bad idea to use gets()? Suggest a workaround.

885


Write the Program to reverse a string using pointers.

607


Tell me what are bitwise shift operators?

645


What is actual argument?

579






Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

657


What are the types of operators in c?

599


Explain goto?

703


What is meant by 'bit masking'?

870


how can use subset in c program and give more example

1487


How can I manipulate strings of multibyte characters?

627


What are the different file extensions involved when programming in C?

736


Why do we need a structure?

573


Why static variable is used in c?

541


 write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare.  You will then tabulate this information in another file.

1718