问题 填空题

以下程序可以把从键盘上输入十进制数(10ng型)以二到十六进制数的形式输出,请填空。
# include<stdio.h>
main( )
char b[16] = ’0’,’1’,’2’,’3’,’4’,’5’,’6’,’7’,’8’,’9’,’A’,’B’,’C’,’D’,’
E’,’F’;
int c[64],d,i=0,base;
long n;
printf("Enter a number:\n");scanf("%1d",&n);
printf("Enter new base:\n");scanf("%1d",&base);
do
c[i]= 【19】
i+ +;
n=n/base;
while(n!=0);
printf("The result is:\n");
for(- -i;i>=0;- -i)
d=c[i];
printf("%c",b 【20】 );

答案

参考答案:11. [19]n% base [20][d]

多项选择题
单项选择题