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 math operations be performed on a void pointer?
Write a program to print all permutations of a given string.
What are register variables in c?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
how to find anagram without using string functions using only loops in c programming
What are header files and explain what are its uses in c programming?
Why main function is special give two reasons?
Write a program with dynamically allocation of variable.
Do pointers need to be initialized?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Can static variables be declared in a header file?
In c language can we compile a program without main() function?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
Explain what’s a signal? Explain what do I use signals for?
Differentiate between declaring a variable and defining a variable?