Write a programme to find even numbers without using any
conditional statement?
Answer Posted / mathiyazhagan
#include<stdio.h>
main()
{
char res[2][5]={"Even","Odd"};
int n;
printf("Enter a number :");
scanf("%d",&n);
printf("the given no is = %s",res[n%2]);
}
| Is This Answer Correct ? | 51 Yes | 7 No |
Post New Answer View All Answers
what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
Explain how can you be sure that a program follows the ansi c standard?
Explain two-dimensional array.
What is the process of writing the null pointer?
Explain what is the benefit of using an enum rather than a #define constant?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is the use of header?
Is there a way to compare two structure variables?
What are terms in math?
How many keywords (reserve words) are in c?
What is the code for 3 questions and answer check in VisualBasic.Net?
What is the purpose of the preprocessor directive error?
Why enum is used in c?
how to write a c program to print list of fruits in alpabetical order?
Write a program to reverse a given number in c?