find a number whether it is even or odd without using any
control structures and relational operators?

Answer Posted / vignesh1988i

THE LAST two answers posted by two folks are correct but the
declarations have been made wrong...... we cant make use of
1D array here , if so only 'e' or 'o' only will get
printed.... but that is not our aim... so correct
declaration is using a 2D array.....
char a[][6]={{"even"},{"odd"}};

and also it is not the must to make use of array of pointers
concept...........

thank u

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain can the sizeof operator be used to tell the size of an array passed to a function?

603


Hai what is the different types of versions and their differences

1503


What is modifier & how many types of modifiers available in c?

620


How can you tell whether two strings are the same?

844


What is the use of extern in c?

659






What is wrong with this program statement?

614


What is the difference between functions abs() and fabs()?

668


Explain null pointer.

630


What is new line escape sequence?

820


Why is c faster?

606


Explain how can I prevent another program from modifying part of a file that I am modifying?

650


What is echo in c programming?

571


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1459


What is structure padding in c?

637


Why is a semicolon (;) put at the end of every program statement?

639