| SlimCracker 2003-02-02, 1:05 pm |
| I have just came across these questions in a book and can't figure out or find out definitely what the answer is. Could you please tell me if I correct or completely wrong and why. Can anyone help? Thank you in advance.
1. With the declarations of
code:
char *p
char *s
which is not valid?
a) p-s
b) p+s
c) p++
d) p+5
I'm leaning on d.
2. A function prototype reads:
code:
int foo(char *d);
which could NOT be used as an argument to foo?
a)a string literal
b)an initialized pointer to char
c)the name of a char array
d)a character literal
I have no clue about this. Can't find anything on it!
Thank you so much for any help you can give me! |