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
10 changes: 5 additions & 5 deletions buggy.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

void main()
{
char password[80);
char password[80]; //fixed array bracket

print("Create a password: "]:
scanf("%s", password);
print("Create a password: "); //fixed parenthesis / semicolon
scanf("%s", &password); //added ampersand

integer passwordlength;
int passwordlength; //changed from integer to int
passwordlength = strlen(password);
printf("Your password is %s and %i characters long', password, passwordlength)
printf("Your password is %s and is %i characters long", password, passwordlength); //quotation and semicolon.

}