Direction: Read the following information carefully to give the a

Direction: Read the following information carefully to give the answers to the questions based on it.

Eight people are sitting in a straight line with equal distance in alphabetical order. Half of them are facing south and half of them are facing north. They all know a different programming language i.e. C, C++, Java, Python, PHP, Swift, C# and SQL (but not necessarily in the same order).

The one who knows C sits to the immediate left of the one who knows SQL. D faces south. There are three people sit between the one who knows Java and the one who knows C++. C neither knows C# nor C. The one who knows C++ sits third to the right of the one who knows Python. Three people sit between the one who knows C# and the one who knows C. The one who knows Swift sits third to the left of the one who knows PHP. D sits second to the right of the one who knows SQL. The one who knows C and the one who knows C# face the same direction. The one who knows PHP sits third to the right of C. The one who knows Java sits third to the left of E.

Question 1:

Who knows Java?

A. C

B. D

C. H

D. I

E. J

Right Answer is: C

SOLUTION

Known Persons: C, D, E

Languages: C, C++, Java, Python, PHP, Swift, C# and SQL

Steps:

1. Eight people are sitting in a straight line with equal distance in an alphabetical order.

2. The one who knows PHP sits third to the right of C.

3. D faces south.

4. D sits second to the right of the one who knows SQL (That means case 3 is ruled out).

5. The one who knows C sits to the immediate left of the one who knows SQL (That means case 2 is ruled out).

6. The one who knows Java sits third to the left of E.

7. There are three people sit between the one who knows Java and the one who knows C++.

8. The one who knows C++ sits third to the right of the one who knows Python.

9. The one who knows Swift sits third to the left of the one who knows PHP.

10. The one who knows C and the one who knows C# face same direction.

11. Half of them are facing south and half of them are facing north.

Clearly, H knows Java.

Question 2: Who is sitting immediately left to G?

A. The one who knows PHP

B. The one who knows C++

C. The one who knows Java

D. Cannot be determined

E. None of these

Right Answer is: C

SOLUTION

Known Persons: C, D, E

Languages: C, C++, Java, Python, PHP, Swift, C# and SQL

Steps:

1. Eight people are sitting in a straight line with equal distance in an alphabetical order.

2. The one who knows PHP sits third to the right of C.

3. D faces south.

4. D sits second to the right of the one who knows SQL (That means case 3 is ruled out).

5. The one who knows C sits to the immediate left of the one who knows SQL (That means case 2 is ruled out).

6. The one who knows Java sits third to the left of E.

7. There are three people sit between the one who knows Java and the one who knows C++.

8. The one who knows C++ sits third to the right of the one who knows Python.

9. The one who knows Swift sits third to the left of the one who knows PHP.

10. The one who knows C and the one who knows C# face same direction.

11. Half of them are facing south and half of them are facing north.

H (Java) sits immediately left to G.

Question 3: Which of the following pair is the correct?

A. B –Language C

B. H – Language Python

C. J – Language Java

D. E – Language C#

E. C – Language SQL

Right Answer is: D

SOLUTION

Known Persons: C, D, E

Languages: C, C++, Java, Python, PHP, Swift, C# and SQL

Steps:

1. Eight people are sitting in a straight line with equal distance in an alphabetical order.

2. The one who knows PHP sits third to the right of C.

3. D faces south.

4. D sits second to the right of the one who knows SQL (That means case 3 is ruled out).

5. The one who knows C sits to the immediate left of the one who knows SQL (That means case 2 is ruled out).

6. The one who knows Java sits third to the left of E.

7. There are three people sit between the one who knows Java and the one who knows C++.

8. The one who knows C++ sits third to the right of the one who knows Python.

9. The one who knows Swift sits third to the left of the one who knows PHP.

10. The one who knows C and the one who knows C# face same direction.

11. Half of them are facing south and half of them are facing north.

Clearly, E – C# is the correct pair.

Question 4: Four of the following five are alike in a certain way and hence form a group. Find the one who does not belong to that group?

A. B

B. C

C. F

D. H

E. E

Right Answer is: E

SOLUTION

Known Persons: C, D, E

Languages: C, C++, Java, Python, PHP, Swift, C# and SQL

Steps:

1. Eight people are sitting in a straight line with equal distance in an alphabetical order.

2. The one who knows PHP sits third to the right of C.

3. D faces south.

4. D sits second to the right of the one who knows SQL (That means case 3 is ruled out).

5. The one who knows C sits to the immediate left of the one who knows SQL (That means case 2 is ruled out).

6. The one who knows Java sits third to the left of E.

7. There are three people sit between the one who knows Java and the one who knows C++.

8. The one who knows C++ sits third to the right of the one who knows Python.

9. The one who knows Swift sits third to the left of the one who knows PHP.

10. The one who knows C and the one who knows C# face same direction.

11. Half of them are facing south and half of them are facing north.

Only E is facing south.

Question 5: Who is sitting immediately left to the one who knows C?

A. D

B. C

C. B

D. E

E. None of these

Right Answer is: C

SOLUTION

Known Persons: C, D, E

Languages: C, C++, Java, Python, PHP, Swift, C# and SQL

Steps:

1. Eight people are sitting in a straight line with equal distance in an alphabetical order.

2. The one who knows PHP sits third to the right of C.

3. D faces south.

4. D sits second to the right of the one who knows SQL (That means case 3 is ruled out).

5. The one who knows C sits to the immediate left of the one who knows SQL (That means case 2 is ruled out).

6. The one who knows Java sits third to the left of E.

7. There are three people sit between the one who knows Java and the one who knows C++.

8. The one who knows C++ sits third to the right of the one who knows Python.

9. The one who knows Swift sits third to the left of the one who knows PHP.

10. The one who knows C and the one who knows C# face same direction.

11. Half of them are facing south and half of them are facing north.

B sits immediately left to A, who knows C.