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

No Death Penalty For Kill Riddle

Ramsay was killed by Sansa in front of everyone but the judge was not sure how to punish Sansa. Why is the judge confused?
category : TRIVIA

Tough River Crossing Riddle

This one is a bit of tricky river crossing puzzle than you might have solved till now. We have a whole family out on a picnic on one side of the river. The family includes Mother and Father, two sons, two daughters, a maid and a dog. The bridge broke down and all they have is a boat that can take them towards the other side of the river. But there is a condition with the boat. It can hold just two persons at one time (count the dog as one person).

No it does not limit to that and there are other complications. The dog can’t be left without the maid or it will bite the family members. The father can’t be left with daughters without the mother and in the same manner, the mother can’t be left alone with the sons without the father. Also an adult is needed to drive the boat and it can’t drive by itself.

How will all of them reach the other side of the river?
category : LOGIC | TRICK

Difficult Brain Twister

A strange tradition is followed in an orthodox and undeveloped village. The chief of the village collects taxes from all the males of the village yearly. But it is the method of taking taxes that is interesting.

The taxes paid in the form of grains and every male should pay equal pounds corresponding to his age. In simpler terms, a man aged 10 years will have to pay 10 pounds of grains and a 20 years old will be paying 20 pounds of grain.

The chief stands on a riser containing 7 different weights next to a large 2 pan scale. As per the interesting custom, the chief can only weigh using three of the seven weights.

In such a scenario, can you calculate what must be the weights of the seven weights each and who is the oldest man the chief can measure using those weights?
category : LOGIC | MATHS

Crossing The River In Minimum Time Puzzle

Four people need to cross a dark river at night.

* They have only one torch and the river is too risky to cross without the torch.
* If all people cross simultaneously then torch light wont be sufficient.
* Speed of each person of crossing the river is different.cross time for each person is 1 min, 2 minutes, 7 minutes and 10 minutes.

What is the shortest time needed for all four of them to cross the river ?

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

Popular Interview Problem

I have two rectangular bars.

They have property such that when you light the fire from one end , it will take exactly 60 seconds to get completely burn.
However they do not burn at consistent speed (i.e it might be possible that 40 percent burn in 55 seconds and next 60 percent can burn in 10 seconds).

Problem is : How do you measure 45 seconds ?

Logic Birthday Puzzle

For my anniversary, I decided to surprise my wife. Since she is a voracious reader, I decided to collect a lot of books for her. On the first day of the month, I bought one book, on the second, I bought two and on the third, I bought three. This process went on till the anniversary and on the day, I had 276 books with me to gift her.

Can you calculate, on which day is our anniversary?
category : LOGIC | MATHS

IAS Interview Problem

I need to divide numbers from 1 to 9 into two group such that sum of numbers in one group is equal to the sum of other group.
Note : 6 cannot be flipped over to make it 9.
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

Candle Trick Teaser Problem

Husband has prepared for a candle light dinner on the honeymoon for his wife. While they were having the dinner, a strong breeze flew through the open window and four candles out of ten were extinguished. After that, the husband closed the window.

How many candles were left in the end?

Puzzles Tags :

Illusions Tags :