find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / om
void odd_even_check(int z)
{
(z&1)?printf("\nodd\n"):printf("\neven\n");
}
Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?
Which is better oop or procedural?
What is an operator?
Explain what is the difference between a string and an array?
What are the advantages and disadvantages of a heap?
Why is extern used in c?
What is the use of structure padding in c?
How do shell structures work?
Why is %d used in c?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures
What are the scope of static variables?
What is preprocessor with example?
What are multidimensional arrays?
Explain how do you view the path?