You are browsing the archive for 2010 February.

Recursion to the rescue!

February 13, 2010 in Uncategorized

Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

Read the rest of this entry →

C code to count the number of words in a string

February 13, 2010 in Uncategorized

Count the number of words in a string, where a word is defined to be a contiguous sequence of non-space characters.

Read the rest of this entry →

C code to remove spaces from a string

February 13, 2010 in Uncategorized

Write a C function to remove spaces from a string. The function header should be
void removeSpaces(char *str) Read the rest of this entry →

Interview tips for programmers

February 13, 2010 in Uncategorized

If you are majoring in Computer Science, chances are you’ll be working with jobs that require some degree of programming. When you’re looking for a job in the market, you’ll be having a lot of interviews. Interviewer loves to challenge you by asking some technical interview questions. Read the rest of this entry →