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 the structure pointer?
What is the difference between the = symbol and == symbol?
What is bubble sort in c?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
What is build process in c?
Explain how can I open a file so that other programs can update it at the same time?
What is the difference between text files and binary files?
Who is the main contributor in designing the c language after dennis ritchie?
Explain the difference between ++u and u++?
Where register variables are stored in c?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
What are the c keywords?
What are the types of macro formats?