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 |
Why should I prototype a function?
array contains zeros and ones as elements.we need to bring zeros one side and one other side in single parse. ex:a[]={0,0,1,0,1,1,0,0} o/p={0,0,0,0,0,1,1,1}
What is the purpose of scanf() and printf() functions?
How can my program discover the complete pathname to the executable from which it was invoked?
What is the function of this pointer?
0 Answers Agilent, ZS Associates,
main() { int l=6; switch(l) { default:l=l+2; case 4:l=4; case 5:l++; break; } printf("%d",l); }
What is c standard library?
What is the difference between int main and void main in c?
Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table
Can we use any name in place of argv and argc as command line arguments?
What are qualifiers and modifiers c?
Is null valid for pointers to functions?