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
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
p*=(++q)++*--p when p=q=1 while(q<=6)
What are the 4 types of unions?
Is c procedural or functional?
Why is c used in embedded systems?
How will you divide two numbers in a MACRO?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
What is void main () in c?
Can we declare a function inside a function in c?
What is structure data type in c?
When do we get logical errors?
Can we increase size of array in c?
What is the right type to use for boolean values in c? Is there a standard type?
What is getch() function?
Explain indirection?