TutorMe homepage
Subjects
PRICING
COURSES
Start Free Trial
Mihir S.
Tutor for the past two years in Computer Science and present intern at WAT Consult.
Tutor Satisfaction Guarantee
Calculus
TutorMe
Question:

Find the limit of the following expression when the value of x tends to 0. Expression= ( xlnx ) It can be written as lnx/(1/x)

Mihir S.

It can be written as lnx/(1/x) where numerator is lnx and denominator is 1/x. Now on substituting the value of x, the expression becomes a form of (inf)/(inf) and hence, we have to apply L'Hospitals rule. It states, when we calculate the limit value of an expression, if it turns out to be of the form 0/0 or inf/inf, then differentiate the numerator and denominator respectively and then substitute the value. So, applying L'Hospitals Rule on the given expression, differentiating lnx and 1/x respectively, numerator becomes 1/x and denominator becomes -1/x^2. Simplifying the numerator/denominator expressions, we get the new expression as -x, now substitute the value of x=0, thus the limit to the above expression is 0.

C++ Programming
TutorMe
Question:

Mihir S.

Function overloading is a feature in C++ where two or more functions can have the same name but different parameters. Consider the following code snippet as an example:- void polyf(int i) { cout << " Here is int " << i << endl; } void polyf(double f) { cout << " Here is float " << f << endl; } void polyf(char* c) { cout << " Here is char* " << c << endl; } So, for the same name 'polyf', different function definitions can be derived which differs in parameters.

C Programming
TutorMe
Question:

Suppose you have to swap the contents of two variables. How would you implement and write a pseudo code for the same.

Mihir S.

To swap two variables, the idea is to consider a third variable that will temporarily hold the value of the first variable so that it's value doesn't get lost when it has been assigned a value of the second variable. So, if we have variables a and b, consider a variable temp, assign it to the value of a. Now, copy the contents of b to a and that of temp to b. You will have the numbers swapped. Pseudo Code: { temp=a; a=b; b=temp; }

Send a message explaining your
needs and Mihir will reply soon.
Contact Mihir