find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / satyanarayana
#include<stdio.h>
void main()
{
int p;
printf("number:");
scanf("%d",&p);
while(p%2)
{
printf("odd");
}
printf("even");
}
| Is This Answer Correct ? | 2 Yes | 10 No |
Post New Answer View All Answers
What is void pointers in c?
What is scope of variable in c?
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Explain union.
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What is function prototype?
What does int main () mean?
What is a far pointer in c?
What are Macros? What are its advantages and disadvantages?
What is a const pointer in c?
What is c language used for?
Process by which one bit pattern in to another by bit wise operation is?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
How many header files are in c?
can any one provide me the notes of data structure for ignou cs-62 paper