单选题:What is the output of the following piece of code?
What is the output of the following piece of code? @[C](2)
```
int num=0, s=0;
while(num<=2){
num++;
s+=num;
}
printf("%d\n",s);
```
A. 1
B. 3
C. 6
D. 10
A.1
B.3
C.6
D.10
答案:C
```
int num=0, s=0;
while(num<=2){
num++;
s+=num;
}
printf("%d\n",s);
```
A. 1
B. 3
C. 6
D. 10
A.1
B.3
C.6
D.10
答案:C