码迷,mamicode.com
首页 >  
搜索关键字:printf    ( 15030个结果
线程共享全局变量和私有全局变量
共享全局变量实例:#include #include #include #include int key=100;void *helloworld_one(char *argc){ printf("the message is %s\n",argc); key=10; printf...
分类:编程语言   时间:2014-06-19 06:19:28    阅读次数:494
c语言自加自减三道题
int x , y,z; x = 0; y = z = -1; x += -z ---y; printf(“x=%d\n”,x) x = 2 为什么? x + = -z - - -y 相当于 x = x + ((-z)--)-y; 这里-z—是先用-z然后再(-z)- -运算 这里需要注意的是操作符...
分类:编程语言   时间:2014-06-18 20:04:46    阅读次数:316
C语言--二维数组,字符串数组,多维数组
#import int main(int argc, const char * argv[]) { // int a[2][3]={ // {1,2,3}, // {4,5,6} // }; // int a[2][3]={1,2,3,4,5,6}; // //打印单个元素 // printf("%d",a[1][1]); // ...
分类:编程语言   时间:2014-06-16 23:05:14    阅读次数:395
printf与++的puzzle
int b = 0; int c = 0; int main(int argc, const char *argv[]) { printf("%d %d %d %d %d",b,b++,b,++b,b); printf("%d %d %d %d %d",c,++c,c,c++,c); return 0; } 结果为 2 1 1 1 0   2 2 1 0 0 这个可以理解,因为p...
分类:其他好文   时间:2014-06-16 18:44:35    阅读次数:170
编程风格的祸
早!!这个星期博主重温了《C程序设计》。。看到那本书的编程风格不太好!!该有的括号也不加。。例如:#includeint main(){int j=0,i=0;int H;for(H=0;H0) //H等于0的时候不执行j++;j++; //for的执行范围i++;printf("%d \n %d ...
分类:其他好文   时间:2014-06-15 15:20:56    阅读次数:166
线程退出前操作
#include #include #include #include void cleanup(){ printf("cleanup\n");}void *test_cancel(void){ pthread_cleanup_push(cleanup,NULL); printf(...
分类:编程语言   时间:2014-06-15 13:13:00    阅读次数:225
使用指针交换两个整数的值
#includevoid change_1(int a, int b);void change_2(int *a, int *b);int main(){ int a = 10; int b = 20; printf("changed before:"); printf("a=%d\tb=%d\n....
分类:其他好文   时间:2014-06-15 11:55:24    阅读次数:249
Linux下线程pid和tid
#include #include #include #include struct message{ int i; int j;};void *hello(struct message *str){ printf("child, the tid=%lu, pid=%d\n",pt...
分类:编程语言   时间:2014-06-15 09:40:46    阅读次数:526
ITK流程自动审核
rcode = CR_set_signoff_decision(signoffs[i],CR_approve_decision,decision_comment);if(rcode!=ITK_ok){ goto CLEANUP;}printf("set approve decision suc...
分类:其他好文   时间:2014-06-15 07:00:35    阅读次数:346
poj3253
#include #include using namespace std; #define read(x) scanf("%lld",&x) int main() { priority_queue,greater >q; long long n,temp,sum; read(n); if(n==1) { read(temp); printf("%lld\n",temp); ...
分类:其他好文   时间:2014-06-14 10:34:12    阅读次数:223
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!