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
Differentiate between static and dynamic modeling.
c language interview questions & answer
Differentiate between the expression “++a” and “a++”?
What is atoi and atof in c?
Where in memory are my variables stored?
Explain how can you be sure that a program follows the ansi c standard?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
What is the use of static variable in c?
What is the purpose of void in c?
What are called c variables?
When we use void main and int main?
What are the types of data structures in c?
How would you obtain the current time and difference between two times?
Which control loop is recommended if you have to execute set of statements for fixed number of times?