# Tutor profile: Saurabh S.

## Questions

### Subject: Physics (Newtonian Mechanics)

In the absence of friction (or any other kind of dissipation, like wind), a force is needed to make a moving object keep on moving. True or False?

False. In the absence of any force to stop the object, it won't require any force to keep the object moving. If a force is applied, it will either increase its velocity or decrease it to zero and then increase in opposite direction depending on the direction of force applied.

### Subject: Linear Algebra

Given $$\vec w$$ =(−5,−4). Find -2$$\vec w$$.

In general, the scalar multiple of k times $$\vec u$$ is this: k$$\vec u$$ = k($$u_x$$,$$ u_y$$) = ($$ku_x$$, $$ku_y$$) So, here's how we find -2$$\vec{w}$$: -2$$\vec w$$ = -2$$\cdot$$(-5,-4) = ( -2 $$\cdot$$ (-5) , -2 $$\cdot$$ (-4) ) =(10,8)

### Subject: C++ Programming

Count the number of set bits in all numbers from 1 to n.

int countingBits(int n){ int count=0,i=0,j=0; //We iterate numbers 1 to n for(i=1;i<=n;i++){ j=i; // This Will sets all set bits of number one by one starting from last bit // For each iteration, we increase the number of count by one while(j){ j= (j&(j-1)); count++; } } // We return answer return count; }

## Contact tutor

needs and Saurabh will reply soon.