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 |
Do character constants represent numerical values?
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..
Is main an identifier in c?
#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); }
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
How to define structures? ·
#include<stdio.h> void main() { char *str; long unsigned int add; str="Hello C"; add=&str[0]; printf("%c",add); } What is the output?
Why do we need arrays in c?
Why c is known as a mother language?
WHY DO WE USE A TERMINATOR IN C LANGUAGE?
Find the O/p of the following 1) #include int main() { char c='1'; int j=atoi(c); }
Is it possible to pass an entire structure to functions?