Write a program to find the given number is odd or even
without using any loops(if,for,do,while)
Answer Posted / ramu gurram
#include<stdio.h>
int main()
{
int i;
printf("enter a number \n");
scanf("%d",i);
float f=i%2;
f==0 ? printf("given number is even") : printf("given
number is odd");
return 0;
}
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Explain what are run-time errors?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
Tell us bitwise shift operators?
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Can a variable be both constant and volatile?
What is infinite loop?
what is the basis for selection of arrays or pointers as data structure in a program
formula to convert 2500mmh2o into m3/hr
How many data structures are there in c?
I have seen function declarations that look like this
Explain the difference between strcpy() and memcpy() function?
Why can’t constant values be used to define an array’s initial size?
What are enumerated types?
Define C in your own Language.
What is an example of structure?