赞题库-背景图
单项选择题

若想定义int型变量a,b,c,d并都赋值为1,以下写法中错误的是( )。

A.int a=b=c=d=1;
B.int a=1,b=1,c=1,d=1;
C.int a,b,c,d;a=b=c=d=1;
D.int a,b,c,d=1;a=b=c=d;