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
Do array subscripts always start with zero?
Explain threaded binary trees?
What is dynamic dispatch in c++?
Differentiate between null and void pointers.
why we wont use '&' sing in aceesing the string using scanf
How does selection sort work in c?
Write a code to remove duplicates in a string.
What are type modifiers in c?
What is this pointer in c plus plus?
What are the different types of pointers used in c language?
Can you please explain the difference between syntax vs logical error?
What is structure in c explain with example?
Is c compiled or interpreted?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Why c is procedure oriented?