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 |
How to Throw some light on the splay trees?
What does & mean in scanf?
What will be the result of the following program? char*g() { static char x[1024]; return x; } main() { char*g1="First String"; strcpy(g(),g1); g1=g(); strcpy(g1,"Second String"); printf("Answer is:%s", g()); } (A) Answer is: First String (B) Answer is: Second String (C) Run time Error/Core Dump (D) None of these
What is double pointer?
Do variables need to be initialized?
how to set Nth bit of a variable?
How does placing some code lines between the comment symbol help in debugging the code?
What do you mean by command line argument?
write a c program to store and print name,address,roll.no of a student using structures?
Why do we use stdio h and conio h?
How can I call a function with an argument list built up at run time?
Write a program for the following series: 1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms