单项选择题

以下程序段的输出结果为().  
char c[]="abc";  
int  i=0;  
do while(c[i++]!=’\0’);printf("%d",i-1);

A.abc
B.ab
C.2
D.3