From 6854a8229b1ab99883c84c9353cf1cc535b98c5c Mon Sep 17 00:00:00 2001 From: TECD-2019 Date: Tue, 3 Dec 2019 17:49:57 -0500 Subject: [PATCH] add buggy.c --- buggy.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/buggy.c b/buggy.c index aae42b1..a8e9b33 100644 --- a/buggy.c +++ b/buggy.c @@ -7,31 +7,32 @@ 3. create a new branch on git 4. git push changed buggy.c 5. create pull request with your name and changes you made +6. screenshot what you did and post it in the dropbox +7. make changes and push */ struct dog { int age; - char name = [10]; + char name [10]; //removed = }; - void main() { - struct (dog) thing1: + struct dog thing1; //removed () around dog and change : to ; struct dog thing2; - thing1.age = [5]; + thing1.age = 5; // removed [] thing2.age = 13; - puts{"What is your dogs name? "}; - gets(thing1.names); + puts("What is your dogs name? "); //changed {} to () + gets(thing1.name); // remove s in name strcpy(thing2.name, "Buster"); - printf("Name: %i\n",thing1.name ); - printf("Age: %i\n",thing1.age): - printf("Thing2 Name: %s\n,thing2.name); - printf("Thing2 Age %i\n',thing2.age); + printf("Name: %s\n",thing1.name); //change %i to %s + printf("Age: %i\n",thing1.age); //change : to ; + printf("Thing2 Name: %s\n",thing2.name); // closed off " + printf("Thing2 Age %i\n",thing2.age); // changed ' to " } \ No newline at end of file