write a program to find the largest of two numbers without
using for,while,switch,if else, conditional operator and do
while using c++ pgmng language
Answers were Sorted based on User's Feedback
Answer / random
double largest(double x, double y){
return (x+y)/2. + abs(x-y)/2.;
}
| Is This Answer Correct ? | 28 Yes | 9 No |
Answer / vishal sharma
double largeone(double a,double b)
{
return(((a+b)/2) + ((a-b)/2));
}
| Is This Answer Correct ? | 9 Yes | 2 No |
When is it necessary to use member-wise initialization list in C++?
what is the realstic modeling?
What is a class oop?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash
design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }
What are the access specifiers avaible in c++?
C#.net Interview Question A=10 B=5 C=A+B Print C The above will be given in a multiline textbox. You need to parse the above input, store values for A,B&c. And you have to display the value of C.
what is the difference between ERROR and EXCEPTION?
what is virtual function in c++
Give two or more real cenario of virtual function and vertual object
What is difference between function overloading and overriding?
What is late bound function call and early bound function call? Differentiate.