现有如下程序段,此程序段编译有错误,则程序段的错误出在 #include<stdio.h> main() { int a=30,b=40,c=50,d; d=a>30? b:c; swish(d) { case a: Printf("%d,",a); case b: printf("%d,",b); case c: printf("%d,",c); default printf("#");}}
A.default:printf("#");这个语句
B.d=a>30? b:c;这个语句
C.case a:printf("%d,",a);case b:printf("%d,",b);case c:printf("%d,",c);这三个语句
D.switch(d)这个语句
[单选题]现有如下程序段,此程序段编译有错误,则程序段的错误出在#includemain(){ int a=30,b=40,c=50,d;d=a >30?b:c;switch(d){case a:printf("%d,",a);case b:printf("%d,",b);case c:printf("%d,",c);default:printf("#");}}A.default:printf("#");这个语句B.d=a>30?b:c;这个语句C.case a:print
[主观题]现有如下程序段,则程序段的输出结果为 (16) 。#include "stdio.h"int fun(){static int k;return k;}main(){int m;m=fun();printf("%d\n",m);}
[单选题]下列程序段没有错误的是( )。A.int*p;cin>>*p;B.int*s,k;*s=100C.int *s ,k; char *p ,c; s=&k; p=&c; *p='a'; *s=1;D.int *s,k; char *p,c; s=&k; p=&c; s=p;
[单选题]23 有如下程序段,该程序段循环的次数是______。 Dim i As Integer Dim j As Integer Dim k As Integer k=0 For i = 0 To 10 Step 3 For j = 1 To 5 If j > 3 Then k = k + 4: Exit For k=k+1 Print k Next j If i > 8 Then Exit For Next iA.9B.10C.11D.12
[单选题]有如下程序:该程序段的输出结果是 ( )。A.987B.876C.8765D.9876
[单选题]有如下程序段 int *p,a=10,b=1; p=&a;a=*p+b; 执行该程序段后,a的值为______。A.12B.11C.10D.编译出错
[单选题]有如下程序段 int *p,a=10,b=1; p=&a;a=*p+b; 执行该程序段后,a的值为A.12B.11C.10D.编译出错
[单选题]有如下程序段,其中会产生编译错误的语句是 inti=0,j=1; int &r=i; //① r=j; //② int * p=&i; //③ * p=&r; //④A.④B.③C.②D.①
[单选题]现有如下程序段#include "stdio.h"main(){ int k[30]={12,324,45,6,768,98,21,34,453,456};int count=0,i=0;while(k[i]){ if(k[i]%2==0||k[i]%5==0)count++;i++; }printf("%d,%d/n",count,i);}则程序段的输出结果为A.7,8B.8,8C.7,10D.8,10
[单选题]现有如下程序段#include "stdio.h"main(){ int k[30]={12,324,45,6,768,98,21,34,453,456};int count=0,i=0;while(k[i]){ if(k[i]%2==0||k[i]%5==0)count++;i++; }printf("%d,%d/n",count,i);}则程序段的输出结果为A.7,8B.8,8C.7,10D.8,10