单项选择题

有以下程序:
#include <stdio.h>
main()
char a=4;
printf("%d\n", a=a<<1);

程序的运行结果是( )。

A) 40
B) 16
C) 8
D) 4
<上一题 目录 下一题>
热门 试题

单项选择题
若有以下定义的语句: struct student int age; int num; ; struct student stu[3]=1001, 20, 1002, 19, 1003, 21; main() struct student *p; p=stu; … 则以下不正确的引用是()。

A. (p++) ->num
B. p++
C. (*p) .num
D. p=&stu.age

单项选择题
以下程序的输出结果是( )。 struct HAR int x, y; struct HAR *p; h[2]; main() h[0].x=1; h[0].y=2; h[1].x=3; h[1].y=4; h[0].p=&h[1]; h[1].p=h; printf( %d%d n , (h[0].p) ->x, (h[1].p) ->y);
A) 12
B) 23
C) 14
D) 32
相关试题
  • 函数fun的功能是:将s所指字符串中除下标为...
  • 下列给定程序中,函数fun的功能是:求出s所...
  • head
  • next
  • *n