(4 points) Identify the errors in the following statements.
int* p = &44;
- i think the star is the error because pointers are supposed to be like *p??
char c = 'w';
char p = &c;
- if its char wouldnt that also be in apostrophe?
So char c= 'w' and char p = '&c' or &'c'???
char c = 'w';
char* p = c;
- still with the star thing, does that not go directly before variable?, also the c not in apostrophes?
float x = 3.14159
float* p = &x;
int d = 44;
int* q = &d;
p = q;
-maybe im wrong but i really thought the star goes directly before. I think i am now. I know the star declares a pointer. I don't know the error in this one
1 answer
first step: try compiling the code. What errors do you get?