write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)

Answer Posted / taesung kim

(number & 1) ? (odd) : (even);

Is This Answer Correct ?    5 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program that accept anumber in words

1248


What is logical error?

603


show how link list can be used to repersent the following polynomial i) 5x+2

1675


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

1589


What is the scope of static variable in c?

530






What is the benefit of using #define to declare a constant?

601


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4979


What are local static variables? How can you use them?

640


Can we declare function inside main?

561


Is flag a keyword in c?

677


Explain modulus operator. What are the restrictions of a modulus operator?

595


What is use of pointer?

583


Explain how do you sort filenames in a directory?

600


What is the process to create increment and decrement stamen in c?

583


What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?

899