×

嵌入式系统工程师英文面试题及解答

消耗积分:0 | 格式:rar | 大小:7 KB | 2011-12-01

分享资料个

 

Basic c question.

1.

Question:

where in memory the variables are stored?

Local variables, global variables, static.

 

 

Answer

Local variables sit in Stack.

Global and static goto Data segment.

Dynamic memory comes from Heap.

 

2.

Question

can you explian the meaning for the follwoing program

 

char *c1, *c2, *c3, *c4, *c5 ;

char analysis[8] = {'a', 'n', 'a', 'l', 'y', 's', 'i' ,'s'};

 

int main()

{

c5 = c4 = analysis;

++c4;

c3 = &analysis[6];

c2 = c5 + 2 ;

c1 = &analysis[7] - 3 ;

 

printf ("%c\t%c\t%c\t%c\t%c", *c1,*c2,*c3,*c4,*c5);

 

return 0;

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

评论(0)
发评论

下载排行榜

全部0条评论

快来发表一下你的评论吧 !