repositories
/
TD_C.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exo3.c: Properly initalize a for loop count integer variable.
[TD_C.git]
/
exo3
/
exo3.c
diff --git
a/exo3/exo3.c
b/exo3/exo3.c
index 89170ea09430b75907e4bec4b994bb8254ec1eeb..03d6390a3e56777b072fc06fc5405db06506881a 100644
(file)
--- a/
exo3/exo3.c
+++ b/
exo3/exo3.c
@@
-32,7
+32,7
@@
void permAlphaChar(char* str, int key) {
char alphabet[26] = "abcdefghijklmnopqrstuvwxyz";
int str_length = stringLength(str);
char alphabet[26] = "abcdefghijklmnopqrstuvwxyz";
int str_length = stringLength(str);
- for (int i; i < str_length; i++) {
+ for (int i
= 0
; i < str_length; i++) {
//if (str[i] == ' ') continue;
for (int j = 0; j < 26; j++) {
if (str[i] == alphabet[j]) {
//if (str[i] == ' ') continue;
for (int j = 0; j < 26; j++) {
if (str[i] == alphabet[j]) {