当前位置:文书君>学习经验>考研>

编程人员笔试题

文书君 人气:2.63W

1. What will be the output of the following C code?

编程人员笔试题

main()

{

int k, num= 30;

k =(num > 5 ? (num <=10 ? 100:200): 500);

printf(“%d”, k);

}

2. What will the following C code do?

int *ptr;

ptr =(int *)Ox67a9;

*ptr = Oxaa55;

3. What will be the output of the follow C code?

#define product(x) (x*x)

main()

{

int i = 3, j, k;

j = product(i++);

k = product(++i);

printf(“%d %d”,j,k);

}

 

TAG标签:编程人员 笔试