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 are the back slash character constants or escape sequence charactersavailable in c?
Explain what are multibyte characters?
What is echo in c programming?
How do I send escape sequences to control a terminal or other device?
Explain setjmp()?
How does normalization of huge pointer works?
What is main return c?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
Tell me can the size of an array be declared at runtime?
What are categories used for in c?
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
Explain why c is faster than c++?
What is the difference between far and near in c?
Why we write conio h in c?
What is s or c?