From 4d01a0271243dee5ae75249f1b60ed3a73a5dca4 Mon Sep 17 00:00:00 2001 From: Kaehvaman Date: Wed, 13 Nov 2024 21:18:07 +0400 Subject: [PATCH] changed strchr_my_arr & strchr_my_ptr --- lab22/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lab22/main.c b/lab22/main.c index 1bfd69c..038ee26 100644 --- a/lab22/main.c +++ b/lab22/main.c @@ -68,7 +68,7 @@ char* strcat_my_ptr(char* destination, const char* source) { return destination; } -char* strchr_my_arr(const char str[], int ch) { +char* strchr_my_arr(char str[], int ch) { int i = 0; while (str[i] != '\0') { if (str[i] == (char)ch) { @@ -79,7 +79,7 @@ char* strchr_my_arr(const char str[], int ch) { return NULL; } -char* strchr_my_ptr(const char* str, int ch) { +char* strchr_my_ptr(char* str, int ch) { while (*str != '\0') { if (*str == (char)ch) { return str;