int main(int argc, char **argv) { spdr_buffer = malloc(LOG_N); spdr_init(&spdr, spdr_buffer, LOG_N); spdr_enable_trace(spdr, TRACING_ENABLED); spdr_set_log_fn(spdr, trace, "Hello"); SPDR_BEGIN2(spdr, "Main", "main", SPDR_INT("argc", argc), SPDR_STR("argv[0]", argv[0])); printf("Hello,"); sleep(3); printf(" 世界.\n"); fun1(); fun1(); fun1(); SPDR_END(spdr, "Main", "main"); spdr_deinit(&spdr); free(spdr_buffer); return 0; }
int main () { Abc obj1 = fun1(); std::cout<<"obj1 address is "<<&obj1<<std::endl; const Abc &obj11 = fun1(); std::cout<<"obj11 address is "<<&obj11<<std::endl; return 0; }
void main() { int p; printf("请输入要转换的整数:"); scanf("%d",&p); printf("这个数转换为二进制为"); fun1(p,2); printf("\n"); printf("这个数转换为八进制为"); fun1(p,8); printf("\n"); printf("这个数转换为十六进制为"); fun2(p,16); printf("\n"); }
void fun4 (void) { /* fun4.1 */ fun1 (); /* fun4.2 */ fun2 (); /* fun4.3 */ fun3 (); /* fun4.4 */ } /* fun4.5 */
void main1() { fun2();//call ?fun2@@YAXXZ fun();//call ?fun@@YAXXZ fun(10);//call ?fun@@YAXH@Z fun1();//call _fun1 }
main() {int n; printf("enter the no\n"); scanf("%d",&n); printf("%d\n",fun1(n)); fun2(n); }
void main() { printf("%d\n",i); fun1(); fun2(); }
int main() { printf("I am in main Function\n"); fun1(); printf("Main Completed\n"); }
int main() { fun1(1,(int***)2); char k, k2; func3(0, &k); return 1; }
void* Thread_Function3(void * arg) { unsigned int number = 0; unsigned int temp = 0; unsigned long func3_tid = 0; func3_tid = pthread_self(); srand((unsigned)time(NULL)); number = rand() % 100 + 1; temp = number; while(number % 2 == 0) number = number / 2; while(number % 3 == 0) number = number / 3; while(number % 5 == 0) number = number / 5; if(number == 1) printf("\n%u is an ugly number \n",temp); else printf("\n%u is an ugly number \n",temp); fun1(temp,func3_tid); return arg; }
int main (int argc, char *argv[]) { unsigned long main_pid = 0; unsigned long num = 0; unsigned long thread = 0; unsigned long thread2 =0; unsigned long thread3 =0; if(pthread_create(&thread,NULL,Thread_Function1,NULL)) { printf("Child 1 return\n"); return(1); } if(pthread_create(&thread2,NULL,Thread_Function2,NULL)) { printf("Child 2 return\n"); return(1); } if(pthread_create(&thread3,NULL,Thread_Function3,NULL)) { printf("Child 3 return\n"); return(1); } main_pid = pthread_self(); num = main_pid % 400; fun1(num,main_pid); printf("main return\n"); return 0; }
int main(void) { int i = 0; int j = 0; i = setjmp(jmpbuffer); //在此调用setjmp函数 if(i==0) { printf("first run\n"); fun1(); fun2(); } else { switch(i) { case 1: printf("In fun1 \n"); break; case 2: printf("In fun2\n"); break; default: printf("unkown error\n"); break; } exit(1); } return 0; }
int main(void) { int a = 1, b = 2; PRINT_INT(a, __FUNCTION__); PRINT_INT(b, __FUNCTION__); b = fun1(a, b); return -1; }
int fun1(int n) { if(n == 1) return 0; else return 1 + fun1(n/2); }
int main(){ int x,y,z; x=10; y=5; z=1; fun1(y,z,1,2,3); }
int main() { int t; scanf("%d",&t); while(t--) { memset(str2,-1,sizeof(str2)); int m; scanf("%d",&m); for(int i=0; i<m; i++) { int a,b; scanf("%d%d",&a,&b); if(a>b) { a=a+b; b=a-b; a=a-b; } str1[i][0]=a; str1[i][1]=b; } fun1(m); printf("%d\n",10*fun2(m)); } //getchar();getchar(); getchar();getchar(); getchar();getchar(); return 0; }
int fun0(int a, int b) { if (a > b) { return fun1(a - 1, b + 1); } else { return b - a; } }
int main() { int i; for (i = 0; i < 256; i++) chartest[i].c = i; chartest[0].c = 0; /* chartest-done */ Fun1(foo1); Fun2(foo2); Fun3(foo3); Fun4(foo4); Fun5(foo5); Fun6(foo6); Fun7(foo7); Fun8(foo8); Fun9(foo9); Fun10(foo10); Fun11(foo11); Fun12(foo12); Fun13(foo13); Fun14(foo14); Fun15(foo15); Fun16(foo16); Fun17(foo17); Fun18(foo18); /* An (almost-)infinite loop that first clears all the variables and then calls each function. This "hack" is to make testing random functions easier - "advance funN" is guaranteed to have always been preceded by a global variable clearing zed call. We don't let this run forever in case gdb crashes while testing, we don't want to be left eating all cpu on the user's system. */ for (i = 0; i < 1000000; ++i) { zed (); L1 = fun1(); L2 = fun2(); L3 = fun3(); L4 = fun4(); L5 = fun5(); L6 = fun6(); L7 = fun7(); L8 = fun8(); L9 = fun9(); L10 = fun10(); L11 = fun11(); L12 = fun12(); L13 = fun13(); L14 = fun14(); L15 = fun15(); L16 = fun16(); L17 = fun17(); L18 = fun18(); } return 0; }
void fun1(struct node* head) { if(head == NULL) return; fun1(head->next); printf("%d ", head->data); }
void compare_err(void (*fun1)(double&,double&,double*data),void (*fun2)(double&,double&,double*data),double *data) { double m1,e1; fun1(m1,e1,data); double m2,e2; fun2(m2,e2,data); cout<<e1-e2<<endl; }
void fun2() { struct big b; b.x = 1; b.y = 2; b.z = 3; int result = fun1( 1, 2, 3, 4, 5, 6, 7, b ); }
double SomaAreas(int n, int J, double m, double theta, double dx){ double x, s; for(x = (dx/2), s = 0.0; x < 1; x += dx) s += fun1(n, J, m, x)*pow(1-x, theta-1)*dx/x; return s; }
int main() { fun1(); fun2(); printf("%p \n", fun1); printf("%p \n", fun2); }
int main (void) { struct s ss; fun1 (0, 0, 200, ss); return 0; }
main(){ char name[128]; int i=10; printf("\nWpisz stringa:"); fun1(i); }
int main(void) { int a[5] = {1,2,3,4,5}; char str[100] = "hello world"; fun1(5,a); //地址传递,传递的是数组的首元素地址a fun2(str); return 0; }
int main(void) { int a,b; scanf("%d%d",&a,&b); printf("%d + %d = %d\n",a,b,fun1(a,b)); printf("%d * %d = %d\n",a,b,fun2(a,b)); return 0; }
int main() { #ifdef usestubs set_debug_traps(); breakpoint(); #endif L1 = fun1(); return 0; }
void main() { int v,a=5,val; v=fun1(a); val=fun2(v); printf("fun1:%d\n",v); printf("func2:%d\n",val); funstr(); }
fun1(int i,int j) { if((i-1)>=0&&b[i-1][j]%2&&a[b[i-1][j]]&&!c[i-1][j]) { c[i-1][j]=1; if((i-1)>=0) fun1(i-1,j); } if((j-1)>=0&&b[i][j-1]%2&&a[b[i][j-1]]&&!c[i][j-1]) { c[i][j-1]=1; if((j-1)>=0) fun1(i,j-1); } if((j+1)<nn&&b[i][j+1]%2&&a[b[i][j+1]]&&!c[i][j+1]) { c[i][j+1]=1; if((j+1)<nn) fun1(i,j+1);} if((i+1)<nn&&b[i+1][j]%2&&a[b[i+1][j]]&&!c[i+1][j]) { c[i+1][j]=1; if((i+1)<nn) fun1(i+1,j); } }