Write a program to find the given number is odd or even
without using any loops(if,for,do,while)

Answer Posted / kiran

main()
{
int n;
printf("enter the number");
scanf("%d",&n);
n%2==0?(printf("given number is even");):(printf("given
number is odd"););

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In c language can we compile a program without main() function?

571


Explain how do you list files in a directory?

610


how to execute a program using if else condition and the output should enter number and the number is odd only...

1652


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1442


the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function

754






What is the difference between functions getch() and getche()?

613


What is the use of parallelize in spark?

570


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

974


What is modeling?

642


What are the different properties of variable number of arguments?

659


What is merge sort in c?

640


What is double pointer in c?

581


How many levels of indirection in pointers can you have in a single declaration?

589


Explain bitwise shift operators?

627


What is hashing in c language?

611