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

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?

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

Pirates Probability Brain Teaser

You are stuck with the pirates who might even kill you on board. They give you a chance to survive. There are hundred black rocks and hundred red rocks. There are two empty sacks which are labelled as heads and tails respectively. You have to divide the rocks in two bags as per your wish. Then a fair coin will be flipped. If its heads, you will have to pick a rock on random from the sack labelled heads and if its tails, you will pick up from the tails sack. If you pick up a black rock, you will be freed and if you pick up a red rock, you will be killed.

How will you distribute the rocks so that your chances of survival are the best?

Awesome Probability Logic Riddle

You need to divide 50 marbles(25-red and 25-blue) into two boxes such that the probability of picking red marble is maximized.

Following conditions need to hold true :
1. None of box is empty
2. All the marbles must be in one of two boxes.
category : LOGIC

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

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?

Whats The Temperature Rebus

Below rebus represents the current Temperature.

0
=========
B.Sc
LLB

What is the current Temperature ?
category : REBUS

Tricky Logic Question

A claustrophobic person boards a train that is just about to enter a tunnel.

Which place will be the best for him to sit?

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

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

Puzzles Tags :

Illusions Tags :