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

Do character constants represent numerical values?

0 Answers  


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

0 Answers   IBM, Wipro,


Is main an identifier in c?

0 Answers  


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

0 Answers   Wilco,


atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation

0 Answers  


‎How to define structures? · ‎

0 Answers  


#include<stdio.h> void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?

4 Answers   Infosys,


Why do we need arrays in c?

0 Answers  


Why c is known as a mother language?

0 Answers  


WHY DO WE USE A TERMINATOR IN C LANGUAGE?

2 Answers  


Find the O/p of the following 1) #include int main() { char c='1'; int j=atoi(c); }

4 Answers   Subex,


Is it possible to pass an entire structure to functions?

0 Answers  


Categories