find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / mohd parvez 09311349697
#include<stdio.h>
#include<conio.h>
void main()
{
int num;
printf("Enter a number:");
scanf("%d",&num);
num%2&&printf("Number is ODD")||printf("Number is EVEN");
getch();
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Can variables be declared anywhere in c?
Who developed c language and when?
application attempts to perform an operation?
What functions are used in dynamic memory allocation in c?
What are Macros? What are its advantages and disadvantages?
How can type-insensitive macros be created?
What are qualifiers?
Which function in C can be used to append a string to another string?
What does sizeof int return?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
What oops means?
Why do we need arrays in c?
Explain function?
What is the advantage of using #define to declare a constant?
What is a macro in c preprocessor?