-
A retired man has $800000 invested at 8% annual rate. He would like to be able to take a certain amount
of money once a year during 24 years until all the money is gone. Calculate the amount of money he will be getting annually.
Hint from Hitequest
-
Write a function of factorial using C language.
Hint from Hitequest
-
Use recursion to write a function of factorial.
Hint from Hitequest
-
For bit manipulation C has some operators. Write a function rotate(m,n) that returns the value of integer m rotated to the
right by n positions.
Hint from Hitequest
Comments from Kuniaki
-
Write a function to reverse the words in the sentence, for example
"This is a string " becomes "string a is This".
Hint from Hitequest
Solution from Ankit
-
Write a function to reverse the words in the sentence, for example
"This is a string " becomes "string a is This". The memory
is limited. You can't use another string for replacement .
Hint from Ying G Chen
Hint from Shimon
Hint from Yair
Solution of Kneofyte
-
You have a linked list. How can you tell that there is no cycling in it?
Hint from Yair
-
How would you write a program to search a file on a hard drive .
Received from A.V., Software application group manager
-
Phone pads have letters accociated with digits: 3 letters for each digit exept #1 and #0.
For example there are "a,b,c" accociated with #2; "d,e,f" are at the button #3 e.t.c
Write a function that prints all possible combinations of your home phone number in letters.
-
What is the difference between basic building blocks in C and C++?
Hint from Hitequest
-
For C++ developers the most frequent question: "What is virtual distructor and when do you need to use it?"
-
Reverse linked list.
-
There is a sequence of random integers, for example 36, 7, -2, 0 ...
Within this sequence you need to find a subsequence with the biggest sum of the numbers?
-
What do you think can be wrong with this function?
char* NewString(char* string1)
{
int i=0;
char* string2[20];
while (i<19 && *(string1+i) != '\0')
{
string2[i] = toupper (*(string1+i));
++i;
}
string2[i] = '\0';
return string2;
}
Hint from Hitequest
-
N.J. from Maryland says he is using the following questions to interview embedded systems C programmers.
- What is the purpose of the preprocessor directive #error?
- How do you code an infinite loop in C ?
- What are the uses of the keyword static?
- What does the following code output?
void foo(void)
{
unsigned int a=6;
int b=-20;
(a+b >6) ? puts(">6") : puts("<=6");
}
Hint from N. J.
-
What operation will take longer time:
- to add two bytes
- to add two floats
- to add byte and float ?
Hint from Hitequest
-
A pair of immature mice got loose in a basement. It takes mice 1 month to mature and another month
to produce a new pair of mice. They will continue to produce a new pair of mice each month. The new
pairs of mice grow and reproduce at the same rate. If no mice die, how many pairs of mice will there
be after a year?
Give an algorithm to solve this problem.
-
How to convert a decimal number to binary (C, PERL)?
-
A function returning free disk space used to work for years. Problems started after the hard drive was upgraded.
The structure of the program is as following:
int free_space (hard drive)
{
...
}
What do you think might be the problem?
Hint from Hitequest
-
Write a progam to print a binary tree such that the root is printed in the middle of its left and right sub-trees.
Hint from RTS (Rutgers)
-
There are two integers a and b. How to exchange the contents of them without using a third one?
Follow ups
-
Here are a couple of questions we received from Java fans.
What is the difference in memory management between Java and C++?
Is it possible to create a memory leak in Java?
|
|
|
| |
Need a recommendation for a
trustworthy agent to help with your job search? More...
| |
|
|
|
|
Do you know how much you are worth on the market?
If you stayed with the same company
for a lengthy period of time, there is a big chance you are underearning.
More... |
|
|
|
|