Interview Process   |   Interview Puzzles / Aptitude   |   Technical Questions
Organization : Athenahealth
Position : Software Developer
1. Do you think that it is valid if we address one element beyond the end of an array?

2. Is it necessary that the array subscripts always start with zero?

3. Do you know the difference between a string copy [s t r cpy] and a memory copy [memcpy]. When should be use each of both?

4. Write a program that can analyze the string:
char str[90]="i am shorter than my sister@1234321. She always a long girl, but not smarter than me"

a) Remove the spaces in between the words.
b) Which is the longest word in t he String?
c) How many letter 'e' are present in the String?
d) Find out the number of integers in the String.
e) Identify the number of doubles in the String.
f) Find out the number of words in teh String.
g) Extract the number of sentences in the String.

5. You are given with N players with weights as input. You need to divide them into two teams comprising of equal weights. But while dividing you need to make sure that the the difference between the number of players in the teams is minimum. Also, output the difference between the number of players in the two teams.
Input Weights: 3 2 1
Output: 1

6. Suppose that a String comprises of just three characters in a String - 'x', 'y', 'z'. Now suppose that in that string, if two different characters appear together they are replaced by the third character. This operation keeps repeating till no reduction is feasible. The String must now be always evaluated from left to right.
Input: abbc
Output: 1

7. How will you right-justify a string?

8. What can you do to avoid including a header more than once?

9. When is the concatenation operator used?

10. Do you think that we can execute a code even when the program exits the main() function?


Thanks Alex for sharing the details of your interview.
Send more details and your personal experiences info@gpuzzles.com
Discussion
Suggestions

Logic Fruits Riddle

There is a box full of fruits,
all but two are grapes,
all but two are apples,
and all but two are oranges.

How many fruits are in the box ?
category : LOGIC | MATHS

Crossing Bridge Brain Teaser

Four friends need to cross a dangerous bridge at night. Unfortunately, they have only one torch and the bridge is too dangerous to cross without one. The bridge is only strong enough to support two people at a time. Not all people take the same time to cross the bridge. Times for each person: 1 min, 2 mins, 7 mins and 10 mins. What is the shortest time needed for all four of them to cross the bridge?

Cool Equation Riddle

If 1 + 9 + 11 = 1, Then what is the value of

12 + 11 + 9 = ?

Logical Interview Problem

Jonathan has three boxes containing milk chocolates and dark chocolates. The problem is that all of them have been labeled incorrectly as follows.
Box1: Dark Chocolates
Box2: Milk Chocolates
Box3: Dark Chocolates and Milk Chocolates

How will he label all the boxes correctly by just opening one box?
category : LOGIC

Logical Arrangement Bonfire Puzzle

30 classmates went for a bonfire. While sitting around the fire, they decided to play a game. To play it, they divided themselves into 5 teams in a way that there were 5 rows having 7 people each.

How can this arrangement be possible while sitting around the bonfire?
category : LOGIC | TRICK

Toothpick Donkey Puzzle

The toothpicks in the picture have been arranged to form a donkey shaped figure. You have to move two matchsticks in a way that the entire shape is rotated / reflected while being intact. Also, you can't change the tail's direction it should be pointing up.

category : LOGIC | PICTURE

Logic Interview Riddle

prinka and tanu organized a small kitty party at home. They purchased a barrel of fruit juice.

Tanu told to prinka 'I bet this barrel of fruit juice is more than half full'.
'No, its less than half full' prinka replied.

I don't have any measuring instrument and without removing fruit juice from it , how can i determine which of us is right ?
category : LOGIC

Measure Water Supply Brain Teaser

You had an infinite supply of water and a 5 ml and 3 ml gallons.

How would you measure exactly 4 ml in least number of steps ?
category : LOGIC | MEASURE

Game Of Dice Brain Teaser

A unique solo game of dice is being played. Two dices are thrown in each turn and the scores are taken by multiplying the numbers obtained.

Now talking about a particular game, here are the facts:
1) The score for the second roll is five more than the score for the first roll.
2) The score for the third roll is six less than the score for the second roll.
3) The score for the fourth roll is eleven more than the score for the third roll.
4) The score for the fifth roll is eight less than the score for the fourth roll.

Reading the above facts, can you tell the score for each of the five throws?
category : LOGIC

The Elf Logical Puzzle

A wicked sorcerer felt enmity towards elf and thus he chooses four among the rest of the elf's and concealed them. The elves are concealed in the ground in a manner that apart from their head the rest of their body was underneath the ground. The elf's are unable to move their body and can only see in that direction that they are facing. All the elf's are concealed underground in such a way that they form a straight line and among those four elf's that are concealed underground one of the elf is detached form the other three elf's via wall. The entire elf's are in the same direction. The elf that is the furthest can only see the heads of its friends in front and a wall. The elf that is second last can only see one head of his friend and a wall. The second elf can only view the wall. The elf can see nothing.
The sorcerer understands the situation and tells the elf's that he has placed hats over their heads. Among the hats places two hat are blue and the other two are red. Among all the four elfs one of the elf has to guess that which colour hat is he wearing. If the elf answers correctly then he shall be set free or else he will have to dig beneath the ground till the very last.
category : LOGIC

Puzzles Tags :

Illusions Tags :