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 is variable and explain rules to declare variable in c?
Find MAXIMUM of three distinct integers using a single C statement
Write the syntax and purpose of a switch statement in C.
Write a program to swap two numbers without using third variable in c?
Explain how can I avoid the abort, retry, fail messages?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
What does void main return?
Why shouldn’t I start variable names with underscores?
Explain the Difference between the New and Malloc keyword.
Explain how can you check to see whether a symbol is defined?
How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same
What do you understand by normalization of pointers?
what are bit fields in c?
What are the different types of control structures?
What does the error 'Null Pointer Assignment' mean and what causes this error?