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
Explain can the sizeof operator be used to tell the size of an array passed to a function?
Hai what is the different types of versions and their differences
What is modifier & how many types of modifiers available in c?
How can you tell whether two strings are the same?
What is the use of extern in c?
What is wrong with this program statement?
What is the difference between functions abs() and fabs()?
Explain null pointer.
What is new line escape sequence?
Why is c faster?
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is echo in c programming?
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
What is structure padding in c?
Why is a semicolon (;) put at the end of every program statement?