Skip to content

Commit

Permalink
Merge branch 'master' of github.com:VasiPeycheva/Introduction-to-Prog…
Browse files Browse the repository at this point in the history
…ramming--2017-2020
  • Loading branch information
IvanFilipov committed Jan 24, 2020
2 parents d4902e6 + 0acb029 commit 41c6924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 10_strings/practice/strings_advanced/solution_04.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool append_chars(char*& str, size_t cnt, char c) {
// allocate enough memory
size_t old_len = strlen(str);
size_t new_len = old_len + cnt + 1;
char* new_mem = new (std::nothrow) char[new_len];
char* new_mem = new (std::nothrow) char[new_len + 1];
if (!new_mem) return false;
// copy the old contain
std::strcpy(new_mem, str);
Expand Down
4 changes: 2 additions & 2 deletions 12_function_pointers/practice/задачи.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ** Задачи - Указатели към функции**
# **Задачи - Указатели към функции**

1. Напишете функция, която по подаден масив от цели числа<br>
и предикат да върне указател към нов масив, чиито елементи са<br>
само числата, за които е изпълнен предиката.<br>
`Предикат - функция от вида F:N -> {0, 1}`
`Предикат - функция от вида F:N -> {0, 1}`<br>
Пример:
```
Вход: 10 23 57 42 71
Expand Down

0 comments on commit 41c6924

Please sign in to comment.