Write a C program to check a number even or odd, without using
any relational, arithmetic operator and any loops.



Write a C program to check a number even or odd, without using any relational, arithmetic operator..

Answer / geniuineprogrammer

u can use bitwise operator
if (no & 1) {
its odd
}

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More C Interview Questions

what will be the output off the following program? #include<stdio.h> int main() { int a; a=015+0*71+5; printf("%d,a"); return0; }

9 Answers   HCL,


Is null always equal to 0(zero)?

0 Answers  


Explain can the sizeof operator be used to tell the size of an array passed to a function?

0 Answers  


What are global variables and how do you declare them?

0 Answers  


Write a program for the following series: 1*3*5-2*4*6+3*5*7-4*6*8+.................up to nterms

5 Answers   Convex Digital,






what does data structure mean?

8 Answers  


Write a program to know whether the input number is an armstrong number.

0 Answers   Wipro,


int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;

0 Answers  


Explain what is the benefit of using const for declaring constants?

0 Answers  


How many parameters should a function have?

0 Answers  


What is the output of the program #include<stdio.h> #include<conio.h> void main() {0 int i,j=20; clrscr(); for(i=1;i<3;i++) { printf("%d,",i); continue; printf("%d",j); break; } getch(); }

4 Answers   CTS, Oracle,


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

0 Answers  


Categories