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 [email protected]
Suggestions

Best Thinking Brain Teaser Ever

Three men are living in a desert namely – Alex, Brian and Chris.

Alex hates Chris and thus he decides to kill him. To succeed in his evil intentions, he poison the water supply of Chris. Since they are living in desert, he will have to drink water or he will die of thirst.

Brian is not aware of the actions of Alex and he plans to kill Chris as well. To do this, he killed the water supply of Chris.

Chris dies due to his thirst. Who killed him?

Famous Probability Puzzle

This is a famous probability puzzle in which you have to choose the correct answer at random from the four options below.
Can you tell us whats the probability of choosing correct answer in this random manner.

1) 1/4
2) 1/2
3) 1
4) 1/4

Math IQ Question

Adam is one of the finalist in an IQ championship. As the final test, he is provided with two hourglass. One of them can measure eleven minutes while the other one can measure thirteen minutes.
He is asked to measure exactly fifteen minutes using those two hourglasses. How will he do it ?
category : LOGIC | MEASURE

Riddle 1 - 1 !=3

Can you move four matchsticks to make the equation true?

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

Induction Brain Teasers

Three college toppers are summoned by the inspecting faculty. To identify the best from them, the faculty takes them into a room and places one hat on each of their heads. Now all of them can see the hats on other’s heads but can’t see his own. There are two colored hats – green and red.

Now the faculty announces that he had made sure that the competition is extremely fair to all three of them. He also gives them a hint that at least one of them is wearing a red hat. Now the first one who is able to deduce his own hat color will be awarded the most intelligent student of all award. After a few minutes, one of them raises his hand and is able to deduce the color correctly.

How?
category : LOGIC

Interview Marble Logic Puzzle

You are given a set of scales and 12 marbles. The scales are of the old balance variety. That is, a small dish hangs from each end of a rod that is balanced in the middle. The device enables you to conclude either that the contents of the dishes weigh the same or that the dish that falls lower has heavier contents than the other.
The 12 marbles appear to be identical. In fact, 11 of them are identical, and one is of a different weight. Your task is to identify the unusual marble and discard it. You are allowed to use the scales three times if you wish, but no more.

Note that the unusual marble may be heavier or lighter than the others. You are asked to both identify it and determine whether it is heavy or light.
category : LOGIC

Classic Lateral Thinking Problem

There are two glasses in front of you. One of the glasses is full of coke and the other glass is full of lemonade. You take a spoonful of coke and mix it into the glass of lemonade. Now the lemonade glass has a mixture of coke and lemonade. You take a spoonful of that mixture and mix it inside the coke glass.

Now what do you think? - The glass with coke has more quantity of lemonade or the glass with lemonade have more quantity of coke mixed with it?

Famous 13 Cave Logic Problem

A thief was running from the police after the biggest theft the town saw. He took his guard in one of the thirteen caves arranged in a circle. Each day, the thief moves either to the adjacent cave or stay in the same cave. Two cops goes there daily and have enough time to enter any two of the caves out of them.

How will the cop make sure to catch the thief in minimum number of days and what are the minimum number of days?
category : LOGIC

Hard Logic Puzzle

A great meeting is held by a great logician where all the other logicians are called upon. The master logician takes them in a room and makes them sit in circle. A hat is placed on each of their heads. Now all of them can see the color of hats others are wearing but can’t see his own. They are told that there different colors of hats.

The master logician explains that a bell will be rung at regular intervals and the moment when a logician knows the color of his hat, he will leave on the next bell. If anyone leaves at the wrong bell, he will be disqualified and sent home.

All of them are assured of one thing that the puzzle will not be impossible for anyone of them. How will they manage the situation?
category : LOGIC

Puzzles Tags :

Illusions Tags :