Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Format files using Prettier code formatter #737

Merged
merged 4 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into feature/prettier
  • Loading branch information
Ebazhanov authored Nov 10, 2020
commit fe234628300f707b1f39b04cce37a41688a679aa
4 changes: 1 addition & 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
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
3 changes: 1 addition & 2 deletions java/java-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,7 @@ Class Main {
}
}
```

- 10 times
- 10 times <<<<--- Correct
- 9 times
- 5 times ~~<<<<---Correct~~
- infinite number of times
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.