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
When should you not use a type cast?
What is the difference between a string and an array?
Why do we use pointer to pointer in c?
Can main () be called recursively?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
code for replace tabs with equivalent number of blanks
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Write a c program to demonstrate character and string constants?
Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
What does sizeof function do?
how to find binary of number?
What are pointers really good for, anyway?
Differentiate between the = symbol and == symbol?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
What does 3 mean in texting?