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
What is action and transformation in spark?
How do I swap bytes?
What are the storage classes in C?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What are structural members?
how to build a exercise findig min number of e heap with list imlemented?
What the different types of arrays in c?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is main function in c?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What is difference between function overloading and operator overloading?
Explain the process of converting a Tree into a Binary Tree.
What is the 'named constructor idiom'?
What is storage class?