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
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Can you mix old-style and new-style function syntax?
What does the message "automatic aggregate intialization is an ansi feature" mean?
What is hashing in c language?
What is c programing language?
What are the parts of c program?
What is meant by recursion?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Here is a good puzzle: how do you write a program which produces its own source code as output?
Explain how can you tell whether a program was compiled using c versus c++?
What are the main characteristics of c language describe the structure of ac program?
Write a program to print factorial of given number without using recursion?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
Explain how can you restore a redirected standard stream?
How is a structure member accessed?