网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
请分析下列程序。 int main() { printf("This is in main program"); if(fork()==0) printf("I am in child process"); else printf("I am in parent process");} 程序正确运行后结果是
A.This is in main program I am in child process I am in parent process
B.This is in main program I am in child process
C.This is in main program I am in parent process
D.This is in main program I am in child process This is in main program I am in parent process
参考答案
更多 “ 请分析下列程序。 int main() { printf("This is in main program"); if(fork()==0) printf("I am in child process"); else printf("I am in parent process");} 程序正确运行后结果是A.This is in main program I am in child process I am in parent processB.This is in main program I am in child processC.This is in main program I am in parent processD.This is in main program I am in child process This is in main program I am in parent process ” 相关考题
考题
有以下程序,程序执行后,输出结果是【11】#include stdio.hvoid fun (int *a){a[0=a[1];]}main(){int a[10]={10,9,8,7,6,5,4,3,2,1},i;for(i=2;i=0;i--) fun{a};for(i=0;i10;i++) printf(“d”,a);printf(“\n”);}
考题
以下程序的输出结果是______。 fun(int *s,int *p) { static int t=3; *p=s[t]; t--; } main() { int str[]={1,2,3,4},i,m=0; for(i=0;i<4;i++) {fun(str,m); printf("%d",m); } printf("\n"); }A.0B.444412C.1234D.4321
考题
请选出以下程序的输出结果includemain(){ int a[]={1,2,3,4},i;int x=0;for(i=0;i
请选出以下程序的输出结果 #include<stdio.h> main() { int a[]={1,2,3,4},i; int x=0; for(i=0;i<4;i++) { sub(a,x);printf("%d",x);} printf("\n");} sub(s,y) int*s,y; { static int t=3; y=s[t];t--; }A.1 2 3 4B.4 3 2 1C.0D.4444
考题
若有以下程序includeint a[]={2,4,6,8};main(){int i; int *p=a; for(i=0;i
若有以下程序 #include <stdio.h> int a[]={2,4,6,8}; main() { int i; int *p=a; for(i=0;i<4;i++)a[i]=*p; printf("%d\n",a[2]);} 上面程序输出结果是A.6B.8C.4D.2
考题
有以下程序,程序执行后,输出结果是【】include void fun(int*A) {a[0]=a[1];} main() {i
有以下程序,程序执行后,输出结果是【 】include<stdio.h>void fun(int*A){ a[0]=a[1];}main(){ int a[10]={10,9,8,7,6,5,4,3,2,1,},i;for(i=2;i>1=0;i-) fun(a[i]);for(i=0;i<10;i++) printf("%d,a[i]);printf("\n");}
考题
请读程序: includeint a[]={2,4,6,8};main (){ int i;int * p=a;for(i=0;i
请读程序: # include<stdio.h> int a[]={2,4,6,8}; main ( ) { int i; int * p=a; for(i=0;i<4;i + +)a[i]=* p + +; printf("%d\n”,a[2]); } 上面程序的输出结果是 ( )A.6B.8C.4D.2
考题
请选出以下程序的输出结果_______。 includesub(int*s,inty){ static int t=3,y=s[t];t
请选出以下程序的输出结果_______。 #include<stdio.h> sub(int*s,inty) { static int t=3, y=s[t];t-; } main() { int a[]={1,2,3,4},i,x=0; for(i=0;i<4;i++){ sub(a,x);printf("%d",x);} printf("\n"); }A.1234B.4321C.0D.4444
考题
下列程序中,正确的为______。A.main() { int *pb=b; float 1>=15.25; print f("%d\n" ,*pb); }B.amin() { int a,*pa; a=10; *pa=a; prinffC%d",*pa); }C.main() { char s[20]; char *ps=s; scanf("%s",*p); printf("%s",*p); }D.main() { char str[10]; int *ps=str[0]; str="abcdefg"; printf("%s",*p); }
考题
请选出以下程序的输出结果()。includesub(int *s,int y){static int t=3; y=s[t];t--;}
请选出以下程序的输出结果( )。 #include <stdio.h> sub(int *s,int y) { static int t=3; y=s[t];t--; } main() { int a[]={1,2,3,4},i,x=0; for(i=0;i<4;i++) { sub(a,x);printf("%d",x); } printf("\n"); }A.1234B.4321C.0D.4444
热门标签
最新试卷