Write a program to find the given number is odd or even
without using any loops(if,for,do,while)
Answer Posted / taesung kim
(num & 1) ? (odd) : (even);
Is This Answer Correct ? | 8 Yes | 11 No |
Post New Answer View All Answers
What is keyword in c?
How can I do serial ("comm") port I/O?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
What is data structure in c and its types?
What is the advantage of an array over individual variables?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
What is static volatile in c?
How can I change their mode to binary?
Which is more efficient, a switch statement or an if else chain?
Where static variables are stored in memory in c?
What are the advantages and disadvantages of a heap?
What are the storage classes in C?
Explain how can I right-justify a string?
How are pointers declared in c?