Find the largest number from the given 2 numbers without using
any loops and the conditional operator.
Answers were Sorted based on User's Feedback
Answer / surya
if(!(a/b)) // if a is less than b then division result will be zero.
02
{
03
cout << " b is greater than a";
04
}
05
else if (!(a-b)) // we know a is greater than or equal to b now. check whether they are equal.
06
{
07
cout << "a and b are equal";
08
}
09
else
10
cout << "a is greater than b";
| Is This Answer Correct ? | 9 Yes | 6 No |
Answer / anji
We can compare two
values using unary
operators also
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain how many levels deep can include files be nested?
What is string concatenation in c?
Explain two-dimensional array.
Explain how are portions of a program disabled in demo versions?
sum of two integers values only other then integer it should print invalid input.
What is malloc return c?
can i know the source code for reversing a linked list with out using a temporary variable?
why programs in c are running with out #include<stdio.h>? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }
How does C++ help with the tradeoff of safety vs. usability?
What is the difference between char a[] = "string"; and char *p = "string"; ?
14 Answers Adobe, Honeywell, TCS,
will u give me old quesrion papers for aptitude for L & t info tech?
what are the various memory handling mechanisms in C ?