C++ questions# Programming - 葵花宝典
i*t
1 楼
Can anyone give me some hints on the following questions? Thanks.
50 char *b, q, *r;
200 b = getbuf ();
201 q = *b;
212 R = anotherfunction (b);
213-2003
/* we want to use q and r here */
2000 char * getbuf ()
2001 {
2002 char buff [8];
2003-2050
/* unspecified buff defined here */
2051 return (char*) buff;
2052 }
1. What will be in variable q after line 201 is executed? Under what
conditions might this not be so?
2. Is there an alternative, but equivalent, way to wr
50 char *b, q, *r;
200 b = getbuf ();
201 q = *b;
212 R = anotherfunction (b);
213-2003
/* we want to use q and r here */
2000 char * getbuf ()
2001 {
2002 char buff [8];
2003-2050
/* unspecified buff defined here */
2051 return (char*) buff;
2052 }
1. What will be in variable q after line 201 is executed? Under what
conditions might this not be so?
2. Is there an alternative, but equivalent, way to wr