网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

有如下C语言程序 void * th_f(void * arg) { printf("Hello World"); pthread_join(2); } int main(void) { pthread_t tid; int st; st = pthread_create(&tid, NULL, th_f, NULL); if(st==0) printf("Oops, I can not createthread\n"); exit(NULL); } 针对上述程序,下列叙述中哪一个是正确的?

A.线程th_f运行后主动退出

B.线程th_f运行后等待一个特定的线程退出

C.线程th_f运行后主动释放CPU给其他线程

D.线程th_f运行后进入死循环


参考答案

更多 “ 有如下C语言程序 void * th_f(void * arg) { printf("Hello World"); pthread_join(2); } int main(void) { pthread_t tid; int st; st = pthread_create( if(st==0) printf("Oops, I can not createthread\n"); exit(NULL); } 针对上述程序,下列叙述中哪一个是正确的?A.线程th_f运行后主动退出B.线程th_f运行后等待一个特定的线程退出C.线程th_f运行后主动释放CPU给其他线程D.线程th_f运行后进入死循环 ” 相关考题
考题 下列程序执行后的输出结果是void func1(int i);void func2(int i);char st[]="hello,friend!";void func1(int i){ printf("%c",st[i]);if(i3){i+=2;func2(i);}}void func2(int i){ printf("%c",st[i]);if(i3){i+=2;func1(i);}}main(){ int i=0; func1(i); printf("\n");}A.helloB.helC.hloD.hlm

考题 下列程序的输出结果是()。 include VOid p(int *x) {printf("%d",++*x); } void main() 下列程序的输出结果是( )。#include<stdio.h>VOid p(int *x){ printf("%d",++*x);}void main(){ int y=3;p(y);}A.3B.4C.2D.5

考题 有如下C语言程序 void * th_f(void * arg) { printf("Hello World"); pthread_exit(0); } int main(voiD) { pthread_t tid; int st; st = pthread_create( if(st==0) printf("Oops, I can not createthread\n"); exit(NULL); } 针对上述程序,下列叙述中哪一个是正确的?A.线程th_f运行后主动退出B.线程th_f运行后等待一个特定的线程退出C.线程th_f运行后主动释放CPU给其他线程D.线程th_f运行后进入等待态

考题 下列程序的输出结果是()。includevoid p(int *x){printf("%d",++*x);}void main(){int 下列程序的输出结果是( )。 #include<stdio.h> void p(int *x) { printf("%d",++*x); } void main() { int y=3; p(y); }A.3B.4C.2D.5

考题 以下程序的输出结果是( )。 include void fun(int x) {if(x/2>0)fun(x/2); printf("%d", 以下程序的输出结果是( )。include<stdio.h>void fun(int x){ if(x/2>0)fun(x/2);printf("%d",x);}main(){fun(3);printf("\n");}

考题 下列程序执行后的输出结果是______。A.helloB.helC.hloD.hlm void func1 (int i); void func2 (int i); char st[]="hello,friend!"; void func1(int i) { printf("%c",st[i]); if(i<3){ i+=2;func2(i); } } void func2 (int i) { printf("%c",st[i]); if(i<3){ i+=2;func1(i); } } main() { int i=0;func1(i);printf("\n");}

考题 下列程序执行后的输出结果是 void funcl(int i); void func2(int i); char st[]="hello,friend!"; void funcl(int i) {printf("%c",st[i]); if(i<3){i+=2;func2(i);}} void func2(int i) { printf("%c",st[i]); if(i<3){i+=2;func1(i);}} main() {int i=A.helloB.helC.hloD.hlm

考题 写出下列代码的输出内容#includeint inc(int a){return(++a);}int multi(int*a,int*b,int*c){return(*c=*a**b);}typedef int(FUNC1)(int in);typedef int(FUNC2)(int*,int*,int*);void show(FUNC2 fun,int arg1, int*arg2){INCp=inc;int temp =p(arg1);fun(temp,arg1, arg2);printf("%d\n",*arg2);}main(){int a;show(multi,10,a);return 0;}

考题 有如下程序void func1(int st[],int i){ printf("%c",st[i]); if(i}void func2(int st[],int i){ printf("%c",st[i]); if(i}main(){ char st[ ]="hello,friend! "; int i=0;func1(st,i); printf("\n");}程序执行后输出的结果是A.hello B.hel C.hlo D.编译出错

考题 下列程序执行后的输出结果是()。includevoid func1(int i);void func2(int i);char st[ 下列程序执行后的输出结果是( )。 #include<stdio.h> void func1(int i); void func2(int i); char st[]="hello,friend!"; void funcl(int i) { printf("%c",st[i]); if(i<3){i+=2;func 2(i);} } void func 2(int i) { printf("%c",st[i]); if(i<3){i+=2;funcl(i);} } main() { int i=0; funcl(i);printf("\n"); }A.helloB.helC.hloD.hlm

考题 下面程序执行后的结果是()。includeusing namespace std;void func1(int i);void func 下面程序执行后的结果是( )。 #include<iostream> using namespace std; void func1(int i); void func2(int i); char st[]="hello, friend!"; void func1(int i) { cout<<st[i]; if(i<3){i+=2;func2(i);} } void func2(int i) { cout<<st[i]; if(i<3){i+=2;func1(i);} } void main() { int i=0;func1(i);cout<<endl;}A.elloB.helC.hloD.him

考题 下列程序执行后的输出结果是( )。 void func1 (int i); void func2(int i); char st[]="hello,friend!"; void func1 (int i) { printf("%c",st[i]); if(i<3){i+=2;func2(i);} } void func2(int i) { printf("%c",st[i]); if(i<3){i+=2;func1(i);}A.helloB.helC.holD.hlm

考题 void setmemory(char **p, int num){ *p=(char *) malloc(num);}void test(void){ char *str=NULL;getmemory(str,100);strcpy(str,"hello");printf(str);}运行test函数有什么结果?( )

考题 char*getmemory(void){ char p[]=”hello world”;return p;}void test(void){char *str=null;str=Getmemory();printf(str);} 请问运行 Test 函数会有什么样的结果.

考题 有下列程序void func1(int i);void func2(int i);char st[ ]="hello,friend! ";void func1(int i){ printf("%c",st[i]); if(i3){i+=2;func2(i);}}void func2(int i){ printf("%c",st[i]); if(i3){i+=2;func1(i);}}main(){ int i=0;func1(i); printf("\n");}执行后的输出结果是A.hello B.helC.hlo D.hlm

考题 下列程序 void func1(int i); void func2(int i) char st[]="hello,friend!"; void funcl(int i) { printf("%c",st[i]); if(i<3){i+=2;func2(i);} } void func2(int i) { printf("%c",st[i]); if(i<3){i+=2;funcl(i);} } main() { int i=0;funcl(i);printf("\n");} 执行后的输出结果是( )A.helloB.helC.hloD.hlrn

考题 void GetMemory(char *p){p = (char *)malloc(100);}void Test(void) {char *str= NULL;GetMemory(str); strcpy(str, "hello world");printf(str);}请问运行 Test 函数会有什么样的结果?

考题 char *GetMemory(void){ char p[] = "hello world";returnp; }void Test(void){char *str = NULL;str = GetMemory(); printf(str);}请问运行 Test 函数会有什么样的结果?

考题 Void GetMemory2(char **p, int num){*p = (char *)malloc(num);}voidTest(void){char *str = NULL;GetMemory(str, 100);strcpy(str, "hello"); printf(str); }请问运行Test 函数会有什么样的结果?

考题 void Test(void){char *str = (char *)malloc(100); strcpy(str, “hello”); free(str); if(str != NULL) { strcpy(str, “world”); printf(str);}}请问运行 Test 函数会有什么样的结果?

考题 下面的程序各自独立,请问执行下面的四个TestMemory 函数各有什么样的结果?①void GetMemory(char * p){p = (char * )malloc(100);}void TestMemory (void){char *str = NULL;GetMemory (str);strcpy(str, "hello world");prinff(str);}② char * GetMemory (void){char p[ ] = "hello world";return p;}void TestMemory (void){char * str = NULL;str = GetMemory( );printf(str);}③void GetMemory(char * * p, int num){* p = (char * )malloc(num);}void TestMemory (void){char * str = NULL;GetMemory(str, 100);strcpy( str, "hello" );printf(sir);}④void TestMemory (void){char *str = (char * )malloe(100);strepy (str, "hello" );free ( str );if(str ! = NULL){strepy( str, "world" );printf(str);}}

考题 有以下程序:include stdio.hint a=1,b=2:void funl(int a,int b){printf( %d%dstdio.hint a=1,b=2:void funl(int a,int b){printf( %d%d,a,b); }void fun2( ){ a=3;b=4; }main( ){ funl(5,6);fun2( );printf(%d%d\n,a,b);}程序运行后的输出结果是( )。A.1 2 5 6B.5 6 3 4C.5 6 1 2D.3 4 5 6

考题 对于如下C语言程序 int main() { printf("Hello World\n"); fork(); printf("Hello World\n"); } 在UNIX操作系统中正确编译链接后,其正确的运行结果是A.共打印出2行Hello WorldB.共打印出3行Hello WorldC.共打印出4行Hello WorldD.共打印出5行Hello World

考题 在进行基于ARM核的嵌入式系统软件开发时,调用如下函数: int do_something(int arg1,void *arg2,char arg3,int *arg4)这四个参数通过什么方式从调用程序传入被调函数?

考题 问答题在进行基于ARM核的嵌入式系统软件开发时,调用如下函数: int do_something(int arg1,void *arg2,char arg3,int *arg4) 这四个参数通过什么方式从调用程序传入被调函数?

考题 单选题有以下程序:#include void fac2(int);void fac1(int n){ printf(*); if(n0)fac2(n-1);}void fac2(int n){ printf(#); if(n0)fac2(--n);}main(){ fac1(3);}程序的运行结果是(  )。A *###B *##*C **##fD *#*#

考题 单选题有以下程序:#include int a=1,b=2;void fun1(int a,int b){ printf(%d%d,a,b);}void fun2(){ a=3; b=4;}main(){ fun1(5,6); fun2(); printf(%d%d,a,b); }程序运行后的输出结果是(  )。A 1256B 5634C 5612D 3456