Lithium-Ion Battery. The same kind of battery found in smartphones, laptops, etc.
Answer:
#include <iostream>
using namespace std;
void swap(int& m, int& n) /* passing by reference so that changes will be made in the original values.*/
{
int t=m;
m=n;
n=t;
}
int main()
{
int val1,val2;
cout<<"Enter the values"<<endl;
cin>>val1>>val2;
cout<<"Values before swap "<<val1<<" "<<val2<<endl;
swap(val1,val2);
//calling the function swap..
cout<<"Values after swap "<<val1<<" "<<val2<<endl;
return 0;
}
Explanation:
Created a function swap with 2 arguments m and n passed by reference.
Answer:
yo! but I'm a ex-mobile legends
Answer:
Explanation:
The following piece of code is written in Java. It creates the method as requested that takes in two generic objects and compares them using the .equals() built in Java method. This method will return True if the objects are identical or False if they are not. A test case is used in the code and the output can be seen in the attached image below.
public static <T> boolean comparePerez(T a, T b) {
return a.equals(b);
}