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
how many key words availabel in c a) 28 b) 31 c) 32
What is pass by reference in c?
You have given 2 array. You need to find whether they will
create the same BST or not.
For example:
Array1:10 5 20 15 30
Array2:10 20 15 30 5
Result: True
Array1:10 5 20 15 30
Array2:10 15 20 30 5
Result: False
One Approach is Pretty Clear by creating BST O(nlogn) then
checking two tree for identical O(N) overall O(nlogn) ..we
need there exist O(N) Time & O(1) Space also without extra
space .Algorithm ??
DevoCoder
guest
Posted 3 months ago #
#define true 1
#define false 0
int check(int a1[],int a2[],int n1,int n2)
{
int i;
//n1 size of array a1[] and n2 size of a2[]
if(n1!=n2) return false;
//n1 and n2 must be same
for(i=0;i
What are near, far and huge pointers?
What is the difference between null pointer and wild pointer?
Explain b+ tree?
Why is c still so popular?
Explain the difference between null pointer and void pointer.
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
What is the use of function in c?
What are multibyte characters?
What does the error message "DGROUP exceeds 64K" mean?
Linked lists -- can you tell me how to check whether a linked list is circular?
How many keywords (reserve words) are in c?