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
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 |
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 |
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 |
Answer / anika
not possible as many names are common between both men and women
| Is This Answer Correct ? | 6 Yes | 3 No |
What is preprocessor with example?
What is #include in c?
Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1
what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }
Can stdout be forced to print somewhere other than the screen?
what is the difference between procedure oriented and object oriented progaming language
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
Explain what are the advantages and disadvantages of a heap?
Explain what’s a signal? Explain what do I use signals for?
Go through this linked list concept.While traversing through the singly linked list sometimes the following code snippet "while(head != NULL)" is used and other times "while(head->link != NULL)"is used(Here head is the pointer pointing to the first node,node has two parts data part and link part).What is the difference between head != NULL and Head->link != NULL and in which situation are they used?
What is the use of parallelize in spark?
How can I convert integers to binary or hexadecimal?