Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions buggy.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#include <stdio.h>
#include <string.h>

//FIND AND FIX THE MISTAKES IN THIS CODE

void main()
{
char password[80);

print("Create a password: "]:
scanf("%s", password);

integer passwordlength;
passwordlength = strlen(password);
printf("Your password is %s and %i characters long', password, passwordlength)

}
1 #include <stdio.h>
2 #include <string.h>
3
4 //FIND AND FIX THE MISTAKES IN THIS CODE
5
6 void main()
7 {
8 char password[80];
9
10 printf("Create a password: ");
11 scanf("%s", &password);
12
13 int passwordlength = 0;
14 passwordlength = strlen(password);
15 printf("Your password is %s and %i characters long \n", password, passwordlength);
16
17 }