Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


program in c++ that can either 2 integers or 2 floating
point numbers and output the smallest number



program in c++ that can either 2 integers or 2 floating point numbers and output the smallest numbe..

Answer / makichut

#include <iostream>
using namespace std;
int smallest(int a, int b){
return (a<b) ? a:b;
}

float smallest(float a, float b){
return (a<b) ? a: b;
}

int main(){
cout<<smallest(10,20)<<endl;
cout<<samllest(10.2,20.2)<<endl;
return 0;
}

Is This Answer Correct ?    37 Yes 16 No

Post New Answer

More OOPS Interview Questions

What are the 5 oop principles?

0 Answers  


oops concept is used for?

3 Answers   Synergy,


Can we have a private constructor ?

12 Answers   HSBC, Ness Technologies, TCS, Wipro,


What do you mean by overloading?

0 Answers  


Which method cannot be overridden?

0 Answers  


What is the renewal class?

0 Answers   Ebix, IBM,


What is deep and shalow copy?

3 Answers   L&T, TCS,


What is virtual destructor? Why?

3 Answers   Agile Software, College School Exams Tests, CSC,


What is advantage of inheritance?

0 Answers  


What is the difference between declaration and definition?

20 Answers   IBS,


What is difference between class and object with example?

1 Answers  


What is the difference between const int *ptr and int const *ptr???

2 Answers  


Categories