write a program to compare 2 numbers without using logical
operators?
Answer Posted / jj
unsigned int is_same(unsigned int a, unsigned int b)
{
return (a / b);
}
int main()
{
unsigned int a, b;
a = 40, b = 40;
if ( is_same(a,b) == 1 )?
cout << "Equal" << endl
:
cout << "Not equal" << endl;
return 0;
}
Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
Can a variable be both const and volatile?
What is the use of a semicolon (;) at the end of every program statement?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
How can I insert or delete a line (or record) in the middle of a file?
What does main () mean in c?
Calculate 1*2*3*____*n using recursive function??
What is indirection?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
Explain the ternary tree?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
What is the use of a static variable in c?
what is the significance of static storage class specifier?
What is omp_num_threads?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list