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
Can 'this' pointer by used in the constructor?
Explain what is a 'locale'?
Why isnt there a numbered, multi-level break statement to break out
why do some people write if(0 == x) instead of if(x == 0)?
What are c identifiers?
How can I read a binary data file properly?
Calculate 1*2*3*____*n using recursive function??
When should a type cast not be used?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What are the features of c language?
Why is a semicolon (;) put at the end of every program statement?
What is the purpose of & in scanf?
What is cohesion and coupling in c?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
Is boolean a datatype in c?