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...


Write a c program to Find the name that you entered is male
name or female name?

Such as Sunjay is name of male and Payal is name of female

Answers were Sorted based on User's Feedback



Write a c program to Find the name that you entered is male name or female name? Such as Sunjay..

Answer / seetaram

this very critical one.i don't know how verify names boy r girl in c

Is This Answer Correct ?    17 Yes 6 No

Write a c program to Find the name that you entered is male name or female name? Such as Sunjay..

Answer / arunkumar

It's not possible for all the names..

Is This Answer Correct ?    9 Yes 2 No

Write a c program to Find the name that you entered is male name or female name? Such as Sunjay..

Answer / sanjay

it can be done when you have list of all the possible names
to be entered..otherwise it is nearlly imposible..

Is This Answer Correct ?    5 Yes 1 No

Write a c program to Find the name that you entered is male name or female name? Such as Sunjay..

Answer / deepak kishore

it's not possible to right answer in 100% cases.
But in 80% cases answer will be right.
Ans in C#.

Console.WriteLine("Enter your Name to get gender");
string s = Console.ReadLine();

int len = s.Length;

char c =s[ len - 1];

if (c == 'a' || c=='A')
{
Console.WriteLine("Female");
}
else if (c == 'e' || c=='E')
{
Console.WriteLine("Female");
}
else if (c == 'i' || c=='I')
{
Console.WriteLine("Female");
}
else if (c == 'o' || c=='O')
{
Console.WriteLine("Female");
}

else if (c == 'u' || c=='U')
{
Console.WriteLine("Female");
}

else
{
Console.WriteLine("Male");
}

Console.ReadLine();


deepak.sonu786@gmail.com

Is This Answer Correct ?    7 Yes 3 No

Write a c program to Find the name that you entered is male name or female name? Such as Sunjay..

Answer / anika

not possible as many names are common between both men and women

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More C Interview Questions

In which language linux is written?

0 Answers  


Why should I use standard library functions instead of writing my own?

0 Answers  


what is the use of macro program

1 Answers   TCS,


void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }

3 Answers   ME, pspl,


How can I read a directory in a c program?

1 Answers   CSC,


How to add two numbers without using semicolon at runtime

2 Answers  


How can I find out if there are characters available for reading?

0 Answers  


How can I read and write comma-delimited text?

0 Answers  


print pattern 1 1 33 33 555 555 77777777 555 555 33 33 1 1

1 Answers   Winit,


How to implement a packet in C

0 Answers   Aricent,


What tq means in chat?

0 Answers  


How can I change their mode to binary?

0 Answers  


Categories