To find whether a number is even or odd without using any
conditional operator??
Answers were Sorted based on User's Feedback
Answer / kala
main()
{
int n;
printf("enter the number\n");
scanf("%d",&n);
if(n%2==0){
printf("number is even");}
else{
printf("number is odd");
}
}
or
if(n&1==0)
printf("even number");
else
printf(odd number");
| Is This Answer Correct ? | 31 Yes | 38 No |
Answer / sahithya
void main()
{
int n;
printf("enter n:");
scanf("%d",&n);
if(n%2==0)
printf( "even");
else
printf("odd");
}
| Is This Answer Correct ? | 15 Yes | 34 No |
Discuss the function of conditional operator, size of operator and comma operator with examples.
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
write a program which will count occurance of a day between two dates.
What is a shell structure examples?
What is pivot in c?
Explain how can I convert a string to a number?
Why doesn't the code "a[i] = i++;" work?
What is the basic structure of c?
What is that continue statement??
What is function and its example?
Is c a great language, or what?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it
5 Answers ABS, Accenture, HCL, Infosys, Infotech, SoftSolve, Software India, TCS, Vertex, Vimukti Technologies,