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 |
Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates
Explain what is a pragma?
What is the c value paradox and how is it explained?
how to find the size of the data type like int,float without using the sizeof operator?
how to create c progarm without void main()?
what will be printed by this printf? printf("%c",printf("hi")["sharkselva"])); }
explain about storage of union elements.
how does the C compiler interpret the following two statements p=p+x; q=q+y; a. p=p+x; q=q+y b. p=p+xq=q+y c. p=p+xq; q=q+y d. p=p+x/q=q+y
what is difference between array and structure?
44 Answers College School Exams Tests, CTS, Google, HCL, IBM, Motorola, TCS,
Write a program to print fibonacci series using recursion?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
How can you return multiple values from a function?