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 do we get logical errors?
Explain how do you declare an array that will hold more than 64kb of data?
What are the different types of control structures?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
Write a program to implement queue.
Why is c so popular?
c program for searching a student details among 10 student details
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
What was noalias and what ever happened to it?
Why is %d used in c?
What are nested functions in c?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Can we assign integer value to char in c?
What are the restrictions of a modulus operator?