Update buggy.c MGriffith #6
Open
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.
char name = [10] -> char name[10]
struct (dog) thing1 -> struct dog thing1
colon -> semicolon
thing1.age = [5] -> thing1.age = 5
puts{"What is your dog's name? "} -> puts("What is your dog's name? ")
gets(thing1.names) -> gets(thing1.name)
printf("Name: %i\n",thing1.name ); -> string, printf("Name: %s\n",thing1.name );
colon -> semicolon
printf("Thing2 Name: %s\n,thing2.name); -> printf("Thing2 Name: %s\n",thing2.name);
printf("Thing2 Age %i\n',thing2.age); -> printf("Thing2 Age: %i\n",thing2.age);
#include <stdio.h>
#include <string.h>
/* Assignment:
*/
struct dog // initiate struct
{
int age; // declare variable for age
char name[10]; // declare variable and count for name
};
void main() // function main begins program execution
{
struct dog thing1; // declare struct thing1
struct dog thing2; // declare struct thing2
} // end function main