作者OREO5566 (饼乾好吃耶)
看板TransCSI
标题[请益] 一些问题...
时间Tue Apr 14 20:32:41 2009
1.假设整数X所在的位址为1000,指向双精准度浮点数资料的指标变数P所在的位
址为4000,经过下列运算之後,各选项的答案为何?(32位元)
X=10;
P=(double*)&X;
*P=20;
[1]X [2]&X [3]sizeof(X) [4]&P [5]*P [6]sizeof(P)
[7]sizeof(P) [8]sizeof(*P) [9]*P-1 [10]*P++
2.下列的程式码中,出现什麽问题
void main( )
{
int x=100 ;
int *p ;
int *q=&x ;
*p=*q+x ;
}
3.巢状struct的资料结构,试利用此struct宣告struct变数dataS,并且设定内部资料
如i=20,j=30,写出main程式,叙述此资料设定动作及资料呈现
struct ints
{
int i ;
struct int w
{ int j ; } dataW ;
} ;
4.何谓动态记忆体?c和c++在动态记忆体是如何配置与释放
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 118.170.88.176
1F:→ zptdaniel:熊熊看起来像是.... 04/14 20:57
2F:推 avogau: 真的看起来很像是.... 04/14 22:14