To find whether a number is even or odd without using any
conditional operator??
Answer Posted / naveen
main ()
{
int num;
if ( num & 1 )
printf ("num is odd number\n");
else
printf ("num is even number\n");
}
Is This Answer Correct ? | 21 Yes | 13 No |
Post New Answer View All Answers
How is pointer initialized in c?
Can we compile a program without main() function?
What are Macros? What are its advantages and disadvantages?
What are keywords c?
Can include files be nested?
How do you convert strings to numbers in C?
What does the characters “r” and “w” mean when writing programs that will make use of files?
Is it fine to write void main () or main () in c?
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
Explain what is the difference between text files and binary files?
Explain the advantages of using macro in c language?
What does malloc () calloc () realloc () free () do?
Why c is called a middle level language?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What is a scope resolution operator in c?