write a program to compare 2 numbers without using logical
operators?

Answer Posted / r.aruna

#include<stdio.h>
#include<conio.h>
void main()
{
int a;
int b;
clrscr();
printf("enter the a value=");
scanf("%d",&a);
printf("enter the b value=");
scanf("%d",&b);
if(a==b)
{
printf("a is greater");
}
else
{
printf("b is greater");
}
getch();
}

Is This Answer Correct ?    4 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is action and transformation in spark?

858


How do I swap bytes?

868


What are the storage classes in C?

848


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1018


What are structural members?

809


how to build a exercise findig min number of e heap with list imlemented?

1873


What the different types of arrays in c?

849


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

901


What is main function in c?

818


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

995


What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?

842


What is difference between function overloading and operator overloading?

897


Explain the process of converting a Tree into a Binary Tree.

2434


What is the 'named constructor idiom'?

863


What is storage class?

874