Edited By Admin
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 info@gpuzzles.com
Discussion
Suggestions
  • Views : 90k+
  • Sol Viewed : 30k+

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?

  • Views : 60k+
  • Sol Viewed : 20k+

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.

  • Views : 40k+
  • Sol Viewed : 10k+

Hard Logic Brain Teaser

There are 100 doors. 100 strangers have been gathered in the adjacent room. The first one goes and opens every door. The second one goes and shuts down all the even numbered doors – second, fourth, sixth... and so on. The third one goes and reverses the current position of every third door (third, sixth, ninth… and so on.) i.e. if the door is open, he shuts it and if the door is shut, he switches opens it. All the 100 strangers progresses in the similar fashion.

After the last person has done what he wanted, which doors will be left open and which ones will be shut at the end?

  • Views : 40k+
  • Sol Viewed : 10k+

Knockout Matches Logical Problem

Let us say that a table tennis tournament was going on with knock out terms which means the one who loses the match is out of the tournament. 100 players took part in that tournament.

How many matches were played?

  • Views : 50k+
  • Sol Viewed : 20k+

Popular Logical Brain Teaser

A couple had to take shelter in a hotel for they could not proceed their journey in the rain. Having nothing to do at all, they started playing cards. Suddenly there was a short circuit and the lights went off. The husband inverted the position of 15 cards in the deck (52 cards normal deck) and shuffled the deck.

Now he asked his wife to divide the deck into two different piles which may not be equal but both of them should have equal number of cards facing up. There was no source of light in the room and the wife was unable to see the cards.

For a certain amount of time, she thought and then divided the cards in two piles. To the husband’s astonishment, both of the piles had equal number of cards facing up.

How did she do it?

  • Views : 80k+
  • Sol Viewed : 20k+

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?

  • Views : 80k+
  • Sol Viewed : 20k+

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 ?

By Admin
  • Views : 80k+
  • Sol Viewed : 20k+

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?

  • Views : 60k+
  • Sol Viewed : 20k+

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?

  • Views : 50k+
  • Sol Viewed : 20k+

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.

Puzzles Tags :

Illusions Tags :