I had a few questions from my study guide...for my upcoming final
The first one is on arrays:
Code:
How many bytes are in the following array?
char list [20] = "Exercise 1";
My answer for this is 20 because i was under the impression that each part of the list is a byte...however, i really doubt that this is true.
How does "Exercise1" play a role in this?
Next problem... Given the following declarations:
Code:
float list [20], *plist, value = 2.2;
int i = 3;
Code:
Identify each of the following statements as valid or invalid:
a. list[2] = value;
b. scanf ("%f", &list[I]);
c. list = value;
d. value = list;
e. plist = value;
f. plist = list;
my answers are
a. valid
b. valid
c. invalid
d. invalid
e. valid
f. valid
Last Question:
Code:
given the following declaration:
int buff[30];
express the address of buff[0] in two different ways
I tried looking up the buff command but i can't find a clear definition...I don't know what this means
Please help as my final is coming up soon...thank you