To find whether a number is even or odd without using any
conditional operator??
Answer Posted / mukul garg
main()
{
int num;
clrscr();
printf("enter the number");
scanf("%d",&num);
(num%2==0)?printf("even num"):printf("odd num");
}
Is This Answer Correct ? | 13 Yes | 16 No |
Post New Answer View All Answers
What are reserved words?
Can you define which header file to include at compile time?
Why does the call char scanf work?
How do I copy files?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
Can we add pointers together?
differentiate built-in functions and user – defined functions.
Is there a way to compare two structure variables?
What is 1d array in c?
Is a house a mass structure?
When should the register modifier be used? Does it really help?
How are strings stored in c?
Explain what header files do I need in order to define the standard library functions I use?
What is a string?
What is null character in c?