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

Decipher MatchSticks Puzzle

Can you decipher the two rows to find the hidden word?

Spatial Trivia Physics Puzzle

As shown in picture, there are four gears with the following specification
* Gear A has 60 teeth
* Gear B has 40 teeth
* Gear C has 20 teeth
* Gear D has 60 teeth
* Every minute, Gear B makes 15 complete turns.

What is the relative speed of Gear A and Gear B?

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

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

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

Move 3 MatchSticks Puzzle

You need to divide area in the picture below into two equal parts by using exactly three match sticks. Can you do it?

Logic Math Problem

David and Albert are playing a game. There are digits from 1 to 9. The catch is that each one of them has to cut one digit and add it to his respective sum. The one who is able to obtain a sum of exact 15 will win the game?

You are a friend of David. Do you suggest him to play first or second?
category : LOGIC | TRICK

Measuring Time Logic Puzzle

You are given with two ropes with variable width. However if we start burning both the ropes, they will burn at exactly same time i.e. an hour. The ropes are non-homogeneous in nature. You are asked to measure 45 minutes by using these two ropes.

How can you do it?

Please note that you can’t break the rope in half as it is being clearly stated that the ropes are non-homogeneous in nature.

Box Ball Logic Problem

There are three bags.The first bag has two blue rocks. The second bag has two red rocks. The third bag has a blue and a red rock. All bags are labeled but all labels are wrong.You are allowed to open one bag, pick one rock at random, see its color and put it back into the bag, without seeing the color of the other rock.

How many such operations are necessary to correctly label the bags ?
category : LOGIC | TRICK

Infoedge Interview Aptitude Problem

On a magical-intellectual land of gpuzzles , all the animal are rational(real smart).

There are six leopards and one sheep.
Leopard can eat sheep but since as the land is magical, the leopards who eats the sheep , turns into sheep and then can be eaten by the remaining leopard(s).

If we leave them for some time then how many sheep and leopard will be there , when we come back ?

Puzzles Tags :

Illusions Tags :