Correcting a spelling mistake (#19845)

* Correcting a spelling mistake

* Formatting and adding missing code

* Removing extra code

* Update index.md
This commit is contained in:
SAKSHI-CHANDEL
2018-10-26 14:59:30 +05:30
committed by Tracey Bushman
parent d14ec72fb8
commit b6ad5afb70
3 changed files with 67 additions and 62 deletions

View File

@ -118,12 +118,12 @@ void copy_string(char [] first_string, char [] second_string)
```C
strcat(first, second);
```
Here is an example of manual implementation of fuction strcat:
Here is an example of manual implementation of function strcat:
void string_concatenate(char [] s1, char [] s2)
{
int i = strlen(s1), j;
for(int j = 0; s2[j]; j++, i += 1)
for(j = 0; s2[j]; j++, i += 1)
{
s1[i] = s2[j];
}
@ -140,7 +140,7 @@ int string_length(char [] string)
{
int i;
for(int i = 0; string[i]; i++);
for(i = 0; string[i]; i++);
return i;
}