06 2023 档案
摘要:#include <stdio.h> int main(){ char i=128; printf("%d",i+1); return 0;} 结果: 10000000 --128 10000001 --补码+1 精度升级 11111111111111111111111110000001 -补码11
阅读全文
摘要:/* printf example */#include <stdio.h> char* my_strcpy(char* des,const char* src){ char *ret=des; while(*src!='\0'){ *des++=*src++; } *des=*src; retur
阅读全文
摘要:/* printf example */#include <stdio.h> int count_one(int n){ int count=0; while(n){ n=n&(n-1); count++; } return count;} int main(){ int a=-1; printf(
阅读全文
摘要:declare n number:=15; count1 int :=0;begin while n<>0 loop n := bitand(n,n-1); count1 := count1+1; end loop; dbms_output.put_line(count1); end; 结果为: 对
阅读全文
摘要:/* printf example */#include <stdio.h> int main(){ int a=10; int b =3; int c=30; int * arr[]={&a,&b,&c}; int i=0; for(i=0;i<3;i++){ printf("%d\n", *ar
阅读全文
摘要:#include <stdio.h> int main(){ int arr[10]={1,2,3,4,5,6,7,8,9,10}; int* p=arr; int i=0; for(i=0;i<10;i++){ printf("%d",*(p+i)); } return 0;}
阅读全文
摘要:#include <stdio.h> void bubble_sort(int* arr,int len){ int i=0; for(i=0;i<len;i++){ int j = 0; for(j=0;j<len-i-1;j++){ if (arr[j]>arr[j+1]){ int tmp=0
阅读全文