选择题   有以下程序:
    #include  <stdio.h>
    main()
    {
    int i,*ptr;
    int array[4]={0,1};
    for (ptr=array,i=0;i<3;i++,ptr++)
    {  if(*ptr==0)putchar('#');
    else putchar('M'+*ptr);
    }
    printf('\n');
    }
    程序运行后的输出结果是
 
【正确答案】 D
【答案解析】 for语句中把array数组首地址值赋给变量ptr。ptr++表示每次执行完循环体后,ptr指向下一数组元素。当指针指向值为0时,输出'#',否则输出'M'+指针对应的数组值。当*ptr=1时,'M'+1='N',结果输出为:#N#,答案为选项D。