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
What is the difference between text files and binary files?
Do you know what are the properties of union in c?
Explain how can a program be made to print the name of a source file where an error occurs?
Explain what is gets() function?
What is extern storage class in c?
How to declare pointer variables?
What the advantages of using Unions?
What is structure in c language?
Do you know the purpose of 'register' keyword?
Are enumerations really portable?
what is stack , heap ,code segment,and data segment
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
What does it mean when a pointer is used in an if statement?
Is fortran still used today?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping