单项选择题

以下程序的输出结果是( )。
main()
int num=0;
while(num<=2)
num++;
printf("%d\n", num);

A.1
2
3
4
B.1
2
3
C.1
2
D.1