Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


WAP to accept first name,middle name & last name of a
student display its initials?

Answers were Sorted based on User's Feedback



WAP to accept first name,middle name & last name of a student display its initials?..

Answer / ankush

hiiii Chandan
your answer is wrong...
first you use print this is wrong....it's printf....
&we cant store string in array by using %c operator...
here we use %s to store a string or print a string...

Is This Answer Correct ?    8 Yes 1 No

WAP to accept first name,middle name & last name of a student display its initials?..

Answer / rina

if nybody nows the answer thn tell me pls.

Is This Answer Correct ?    11 Yes 5 No

WAP to accept first name,middle name & last name of a student display its initials?..

Answer / 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

WAP to accept first name,middle name & last name of a student display its initials?..

Answer / 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

WAP to accept first name,middle name & last name of a student display its initials?..

Answer / 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

More C Interview Questions

What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

0 Answers  


What are the types of c language?

0 Answers  


YBJBU6

1 Answers  


Where static variables are stored in memory in c?

0 Answers  


Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort

3 Answers  


Why shouldn’t I start variable names with underscores?

0 Answers  


write a program that explain #define and # undef directive

1 Answers  


Hi can anyone tell what is a start up code?

0 Answers   CTS,


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

0 Answers  


What are bit fields? What is their use?

2 Answers   Adobe,


Do you know the difference between exit() and _exit() function in c?

0 Answers  


what is output of the following statetment?Printf(“%x”, -1<<4); ?

5 Answers  


Categories