Skip to content

coding assignment#3

Open
yaelkelmer wants to merge 1 commit intoCPRO-Session1:masterfrom
yaelkelmer:master
Open

coding assignment#3
yaelkelmer wants to merge 1 commit intoCPRO-Session1:masterfrom
yaelkelmer:master

Conversation

@yaelkelmer
Copy link
Copy Markdown

No description provided.

@yaelkelmer
Copy link
Copy Markdown
Author

Something went wrong with my github and I couldn't upload my text file so here are my answers.
Yael Kelmer

  1. The difference between a string and character array is that a string is already null-terminated, but a character array is not.
  2. The advantage of arrays in C is that you don't have to initialize a bunch of variables, rather use the indexes of the array to create variables. The disadvantage of arrays in C is that the size of the array has to be pre-determined and it cannot change afterwards. This means that if you input too little, you have wasted space and if you input too much, the code may break.
  3. The compiler does not implicitly generate the address of the first element of an array when ...
  4. Two strings would be compared to see if they are equivalent in content by using the strcmp() function. In code it would look like this: strcmp (string1 , string2);
    If the computer returns 0, then string1 and string2 are the same in content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant