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

Answer Posted / shiv kumar

(num/2==0)? printf("even"):printf("odd");

Is This Answer Correct ?    20 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I do peek and poke in c?

609


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1838


Explain what is a 'locale'?

574


Why #include is used in c language?

584


How can you find the day of the week given the date?

605






How are 16- and 32-bit numbers stored?

710


What is a sequential access file?

641


What is difference between Structure and Unions?

630


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1466


What is structure data type in c?

558


What does the error 'Null Pointer Assignment' mean and what causes this error?

732


Do pointers store the address of value or the actual value of a variable?

600


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

1486


What is c value paradox explain?

563


What is difference between structure and union in c programming?

561