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

Answer Posted / geniuineprogrammer

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

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the diffrenet bettwen HTTP and internet protocol

1394


1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.

2338


Explain what is a static function?

633


can we change the default calling convention in c if yes than how.........?

2036


What is the use of header files?

607






What is the use of linkage in c language?

618


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

676


What is header file definition?

571


Why C language is a procedural language?

623


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

1860


Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

759


How can you allocate arrays or structures bigger than 64K?

684


What are the storage classes in C?

625


What is a method in c?

629


What is bash c?

558