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 does the error 'Null Pointer Assignment' mean and what causes this error?
int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer
What is switch in c?
How to write a multi-statement macro?
Once I have used freopen, how can I get the original stdout (or stdin) back?
why return type of main is not necessary in linux
What is difference between array and pointer in c?
What is calloc malloc realloc in c?
What are bitwise shift operators in c programming?
Process by which one bit pattern in to another by bit wise operation is?
Is c easier than java?
What is pragma in c?
What is break in c?
how to construct a simulator keeping the logical boolean gates in c
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.