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 are the different types of endless loops?
How do you define a function?
void main() { int i=5; printf("%d",i+++++i); }
how to add numbers without using arithmetic operators.
what is the function of void main()?
How to write a code for reverse of string without using string functions?
What is the sizeof () a pointer?
Given a single Linked list with lakhs of nodes and length unknown how do you optimally delete the nth element from the list?
What is bss in c?
If the static variable is declared as global, will it be same as extern?
Explain what is gets() function?
how do you redirect stdout value from a program to a file?