To find whether a number is even or odd without using any
conditional operator??
Answer Posted / 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 |
Post New Answer View All Answers
What is the heap in c?
Explain how can a program be made to print the name of a source file where an error occurs?
What should malloc() do?
What is the difference between ‘g’ and “g” in C?
How will you delete a node in DLL?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
Explain how do you sort filenames in a directory?
Is c compiled or interpreted?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
Is flag a keyword in c?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
In C language what is a 'dangling pointer'?
In C programming, how do you insert quote characters (‘ and “) into the output screen?