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

Answer Posted / dheerendra

logic
main()
{
int a;
(a%2==0)?printf("even"):printf("odd")
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the code for 3 questions and answer check in VisualBasic.Net?

1931


Why is c called c not d or e?

870


Not all reserved words are written in lowercase. TRUE or FALSE?

1016


Can a program have two main functions?

874


Define Spanning-Tree Protocol (STP)

901


How can I direct output to the printer?

1095


What are the advantages of c preprocessor?

1016


Is it fine to write void main () or main () in c?

769


When can you use a pointer with a function?

778


What does %d do?

976


What are terms in math?

820


Which is better malloc or calloc?

889


Why c language?

861


What is pointers in c?

924


What the different types of arrays in c?

845