Qualcomm

www.qualcomm.com

Interview Question

Interim Engineering Intern Interview Boulder, CO

Nothing unexpected. Pretty standard questions like

  reversing a string in C etc.
Answer

Interview Answer

1 Answer

0

void reverse(char* input)
{
    char temp;
    char *end;
    end = input;
    while(*end) {
        end++;
    }
    end--;

    while (input < end) {
        temp = *input;
        *input = *end;
        *end = temp;
        input++;
        end--;
    }
}

Anonymous on Mar 21, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.