Solution for kth row of Pascal's triangle for a job interview
For one thing, the inconsistency with whitespace use and curly brace placing may demonstrate a lack of attention to detail.  Before you attack the actual problem, make sure your code is written cleanly.

This:


for(int i=0;i&lt;=rowIndex;i++)



should use some whitespace:

for (int i = 0; i &lt;= rowIndex; i++)


You already do this in other places, and it should be done everywhere.

Also, this:


for(int i=0;i&lt;=rowIndex;i++)
{sol=C(rowIndex,i);
v.push_back(sol);}



looks a bit sloppy and is harder to read.  Again, use more whitespace, but also separate the loop body from the curly braces.

for (int i = 0; i &lt;= rowIndex; i++) {
    sol = C(rowIndex, i);
    v.push_back(sol);
}