All issues corrected#2
Open
Shanks13-37 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes made:
1
Initializing the rev string with elements of str string from backward.
##2
incrementing 'even' instead of 'i'.
##3
each element of the new string is initialized with the corresponding element of the z string in the for loop.
##4
bubble sort.
##5
The break should be for the case and not inside the for loop, then the break exits the for loop but not the case thus giving an error. And int flag =0 and declaring just the variable flag does not make any difference.
##6
strcmp gives 1 if the strings are the same but 1 is taken as false in the if statement so !strcmp corrects it.
##7
b is a pointer that has the address of 7 so (a+b) won't give us the sum of a+7, we need to dereference the pointer by writing *b so it (a+*b).
##8
The for loop goes on incrementing until it comes across \0 which is always at the end of the string literals stored in str.
##9
If n==0 then the value returned will be 1 if not then it implements the else statement which includes recursion.