Skip to content

Commit

Permalink
Merge branch 'master' into feature/prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebazhanov authored Nov 10, 2020
2 parents 035305d + dda96dc commit fe23462
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,15 @@
"code",
"design"
]
},
{
"login": "srinidhimurthy",
"name": "Srinidhi Murthy",
"avatar_url": "https://avatars3.githubusercontent.com/u/10862228?v=4",
"profile": "https://github.com/srinidhimurthy",
"contributions": [
"design"
]
}
],
"contributorsPerLine": 7,
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Linkedin-quiz-questions

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-165-orange.svg?style=flat-square)](#contributors-)

[![All Contributors](https://img.shields.io/badge/all_contributors-166-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

> This repository does not pretend to give you all answers for LinkedIn questions, rather it's a starting guide to help you prepare for the LinkedIn skills quiz and to know what to expect in the main exam or which areas to target in your exam preparations. Should you have found some incorrect answers, or want to contribute your answers, please feel free to create any PR changes - all are welcome!
Expand Down Expand Up @@ -301,6 +299,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://www.linkedin.com/in/zaahidali/"><img src="https://avatars1.githubusercontent.com/u/37751705?v=4" width="100px;" alt=""/><br /><sub><b>Zahid Ali</b></sub></a><br /><a href="https://github.com/Ebazhanov/in-quiz-questions/commits?author=zaahidali" title="Code">💻</a> <a href="#design-zaahidali" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/SuperGuy10"><img src="https://avatars2.githubusercontent.com/u/13461705?v=4" width="100px;" alt=""/><br /><sub><b>Chad Chai</b></sub></a><br /><a href="https://github.com/Ebazhanov/in-quiz-questions/commits?author=SuperGuy10" title="Code">💻</a> <a href="#design-SuperGuy10" title="Design">🎨</a></td>
<td align="center"><a href="https://marcobiedermann.com"><img src="https://avatars0.githubusercontent.com/u/5244986?v=4" width="100px;" alt=""/><br /><sub><b>Marco Biedermann</b></sub></a><br /><a href="https://github.com/Ebazhanov/in-quiz-questions/commits?author=marcobiedermann" title="Code">💻</a> <a href="#design-marcobiedermann" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/srinidhimurthy"><img src="https://avatars3.githubusercontent.com/u/10862228?v=4" width="100px;" alt=""/><br /><sub><b>Srinidhi Murthy</b></sub></a><br /><a href="#design-srinidhimurthy" title="Design">🎨</a></td>
</tr>
</table>

Expand Down
59 changes: 53 additions & 6 deletions c++/c++quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,59 @@ Q.19 What is a valid definition for the get_length function, which returns the l
int get_length(char \*str);

a )int get_length(char *str){ int count=0; while(str[count++]); return count-1; }


b) int get_length(char *str){ int count=0; while(str!=NULL){ count++; str++; } return count; } <<Correct


c) int get_length(char *str){ int count=0; while((*str)++) count++; return count; }


d) int get_length(char *str){ int count=0; while(str++) count++; return count; }

Q.20 Which STL class is the best fit for implementing a collection of data that is always ordered so that the pop operation always gets the greatest of the elements? Suppose you are interested only in push and pop operations.

a) std::list
b) std::vector
c) std::priority_queue
d) std::map

Q.21 What is the meaning of the three sections specified between parentheses in a for loop separated by semicolons?

a) The first is the iterating variable name, the second is the number of times to iterate, and the third is the desired increment or decrement (specified with a signed integer).
b) The first is the initialization block, the second is the condition to iterate, and the third is the increment block.
c) The first is the iterating variable, the second is the container in which it should operate, and the third is an exit condition to abort at any time.
d) The first is the iterating variable name, the second is the starting value for the iterating variable, and the third is the stop value (the last value plus one).


Q22. What is printed from this code?

int i = 0;
printf("%d",i++);
printf("%d",i--);
printf("%d",++i);
printf("%d",--i);

a) 0,1,1,0 << correct
b) 0,1,0,1
c) 0,0,1,0
d) 1,0,1,0

Q.23 What is true about the variable named ptr?

a) It is a pointer initialized at NULL
b) It is a pointer to a void function
c) That declaration causes a compiler error, as pointers must specify a type.
d) It is a pointer to a value with no specific type, so it may be cast to point to any type.

Q.24 What is the output of this code?

int c=3; char d='A';
std::printf("c is %d and d is %c",c,d);

a) c is d and d is c
b) c is A and d is 3
c) c is 3 and d is A << correct
d) c is c and d is d
Q.25 What is the output of this code?

printf("1/2 = %f",(float)(1/2));

a) 1/2 = 0.499999
b) 1/2 = 0
c) 1/2 = 0.000000 << correct
d) 1/2 = 0.5
7 changes: 4 additions & 3 deletions java/java-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,13 @@ Class Main {
}
}
```

- 10 times
- 10 times <<<<--- Correct
- 9 times
- 5 times <<<<---Correct
- 5 times ~~<<<<---Correct~~
- infinite number of times

Reason : Observe the loop increment. It's not an increment, it's an assignment(post).

#### Q25. The runtime system starts your program by calling which function first?

- print
Expand Down

0 comments on commit fe23462

Please sign in to comment.