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

Interview Balls Puzzle

In a closed jar, there are three strawberry candies, two mango candies and five pineapple candies. You can't see inside the jar. Now, how many toffees you must take out from the jar to make sure that you have one of each flavor?
category : LOGIC

Spot The Difference Christmas Tree Riddle

Can you spot 5 differences in two Christmas tree below?

category : PICTURE

Impossible Brain Teaser

In a recreational activity, you are given four different jars of 2 liters, 4 liters, 6 liters and 8 liters respectively with an unlimited water supply. Then you are asked to measure exactly 5 liters of water using them.

How will you do it?

Water Measurement Riddle

A barman is having a 12 liters jug full of beer. He needs to divide or split that beer into two equal parts. All he has is two empty jugs of capacity 8 liters and 5 liters.

How will he do it using them?
category : LOGIC | MEASURE

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?

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

Maths Magic Riddle

I can prove why 1 = 2

Step1. Lets say y = x
Step2. Multiply through by x xy = x2
Step3. Subtract y2 from each side xy - y2 = x2 - y2
Step4. Factor each side y(x-y) = (x+y)(x-y)
Step5. Divide both sides by (x-y) y = x+y
Step6. Divide both sides by y y/y = x/y + y/y
Step7. And so... 1 = x/y + 1
Step8. Since x=y, x/y = 1 1 = 1 + 1
Step9. And so... 1 = 2

How is this possible ?

Fake Coin Brain Teaser

In front of you, there are 9 coins. They all look absolutely identical, but one of the coins is fake. However, you know that the fake coin is lighter than the rest, and in front of you is a balance scale. What is the least number of weightings you can use to find the counterfeit coin?
category : LOGIC

Popular Deductive Logic Problem

Eight Brothers lives in an old house where there is no electricity and no computers or any any other gadget.

Brother-1: Reading Comics
Brother-2: Playing Chess
Brother-3: Writing
Brother-4: making food for the family
Brother-5: sleeping and snoring
Brother-6: cleaning house
Brother-7: watering the plants


what is Brother-8 doing ?
category : LOGIC | TRICK

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

Puzzles Tags :

Illusions Tags :