Write a program to find the given number is odd or even
without using any loops(if,for,do,while)
Answers were Sorted based on User's Feedback
Answer / kiran
main()
{
int n;
printf("enter the number");
scanf("%d",&n);
n%2==0?(printf("given number is even");):(printf("given
number is odd"););
| Is This Answer Correct ? | 8 Yes | 3 No |
#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 |
What is encapsulation?
How do c compilers work?
What is Lazy evaluation in C? Give an example.
Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.
int a=20; int b=30; int c=40; printf("%d%d%d"); what will be the output?
Can a pointer be volatile in c?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What is default value of global variable in c?
What are the differences between new and malloc in C?
write a program that finds the factorial of a number using recursion?
what is the use of bitfields & where do we use them?
What Is The Difference Between Null And Void Pointer?