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

Write a program on swapping (100, 50)

638


What are the salient features of c languages?

625


What are c identifiers?

629


What is a pointer value and address in c?

636


Is c call by value?

606






Can you please explain the difference between syntax vs logical error?

697


What is string in c language?

625


What is difference between Structure and Unions?

640


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

639


Write a program to reverse a given number in c?

600


What is the heap?

685


What is stack in c?

615


What is wild pointer in c with example?

575


write a program to display all prime numbers

1456


Explain the Difference between the New and Malloc keyword.

688