若有以下程序
#include
main()
{ int a=-2, b=0;
do { ++b ; } while(a++);
printf("%d,%d\n", a, b);
}
则程序的输出结果是
热度🔥1,711
解析:打开微信小程序查看本题解析
若有以下程序
#include
main()
{ char a[20], b[ ]="The sky is blue."; int i;
for (i=0; i
则输出结果是
有以下程序
#include
#include
main()
{ char w[20], a[5][10]={"abcdef", "ghijkl", "mnopq", "rstuv", "wxyz."};
int i;
for (i=0; i<5; i++)
w[i]=a[i][ strlen(a[i])/2];
w[5]= '\0';
puts(w);
}
程序的运行结果是
设系统中有三种类型的资源(A,B,C)和五个进程(P1,P2,P3,P4,P5),A资源的数量是17,B资源的数量是6,C资源的数量为19。在T0时刻系统的状态如下表:
最大资源需求量 已分配资源量
A,B,C A,B,C
P1 4,0,11 4,0,5
P2 5,3,6 4,0,2
P3 4,2,5 2,1,4
P4 5,5,9 2,1,2
P5 4,2,4 3,1,3
系统采用银行家算法实施死锁避免策略,若当前系统剩余资源(A,B,C)分别为(2,3,3),下列哪一个序列是安全序列?