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
how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?
How reliable are floating-point comparisons?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
What is wrong with this code?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What is preprocessor with example?
What is typedef?
What is a protocol in c?
What are keywords in c with examples?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
Why should I prototype a function?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
Explain do array subscripts always start with zero?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Difference between macros and inline functions? Can a function be forced as inline?