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 |
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
Why do while loop is used?
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort
What is multiple inheritance? Give Example
What is class encapsulation?
How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
What is abstraction in oop with example?
What do we mean by a hidden argument in a function?
What do you mean by abstraction?
What is the highest level of cohesion?
What is class in oop with example?