Write a program to find given number is even or odd without
using any control statement.

Answer Posted / saneemask

main()
{

{
char a[][5]= {"Even","Odd"};
int n;
printf("Enter any no.: ");
scanf("%d",&n);
printf("%s",a[n%2]);
getch();
}
{

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1543


Differentiate between #include<...> and #include '...'

619


What language is windows 1.0 written?

578


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

661


In a switch statement, what will happen if a break statement is omitted?

605






Why do we use int main instead of void main in c?

626


What are the 5 organizational structures?

571


What does sizeof return c?

610


What is a volatile keyword in c?

639


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1308


Why use int main instead of void main?

601


How many types of operators are there in c?

621


What is c language in simple words?

598


What are the types of bitwise operator?

667


What is s in c?

621