more_horiz CancelDelete Comments No comments Let's comment your feelings that are more than good LoginSign Up Qiita Conference 2024 Autumn will be held!: 11/14(Thu) - 11/15(Fri) Qiita Conference is the largest tech conference in Qiita!
CHAR_MAX:char型の最大値 UCHAR_MAX:unsigned char型の最大値 SHRT_MIN:short int型の最小値 SHRT_MAX:short int型の最大値 USHRT_MAX:unsigned short int型の最大値 INT_MIN:int型の最小値 INT_MAX:int型の最大値 UINT_MAX:unsigned int型の最大値 ...
The ISO/IEC 9899:1990 standard specified that the language should support four signed and unsigned integer data types- char, short, int, and long- but placed very little requirement on their size other than that int and short be at least 16 bits and long be at least as long as int and...
(char*ret=dst;n;++ret,++s,--n){*ret=*s;if((unsignedchar)*ret==(unsignedchar)c)returnret+1;}return0;}intmain(){constchar*str1="hello there 1";constchar*str2="hello there 2";charbuffer[MAX];concatStrings(concatStrings(buffer,str1,'\0',MAX)-1,str2,'\0',MAX);printf("%s\n...
P2513R4 char8_t Compatibility and Portability Fix VS 2022 17.4 DR P2579R0 Mitigation strategies for P2036 ”Changing scope for lambda trailing-return-type” X P2582R1 Wording for class template argument deduction from inherited constructors XC++...
#include<errno.h>#include<stdio.h>#include<stdlib.h>#include<string.h>#defineSIZE 100typedefenum{Jan,Feb,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC}month;typedefstruct{unsignedchardd;month mm;unsignedyy;}date;#defineMALLOC_ARRAY(number, type) ((type *)malloc((number) * sizeof(type)))in...
P2513R4 char8_t Compatibility and Portability Fix VS 2022 17.4 DR P2579R0 Mitigation strategies for P2036 ”Changing scope for lambda trailing-return-type” X P2582R1 Wording for class template argument deduction from inherited constructors XC++...
voidsend_char(pid_tpid,charc){intbit;inti;unsignedcharuc;uc=(unsignedchar)c;i=0;while(i<8){usleep(50);bit=(uc>>i)&0x01;if(kill(pid,SIGUSR1+bit)==-1)fatal("kill error");i++;}} どれくらいのインターバルを設定するべきか、という根拠は現状ありません。
intmain(){void*output=mmap(NULL,CODE_LEN,(PROT_READ|PROT_WRITE|PROT_EXEC),(MAP_PRIVATE|MAP_ANONYMOUS),-1,0);char*code="\x55\x48\x89\xe5\x48\x8d\x35\xf5\xff\xff\xff\x83\x06\x13\x83\x46\x01\x1d\x83\x46\x02\xe3\x83\x46\x03\x87\x83\x46\x04\x27\x83\x46\x05\...
(Map*map,char*key){inthash=0;for(inti=0;key[i]!='\0';i++){hash=(hash*137+(key[i]&255))%map->size;}returnhash;}voidinit_map(Map*map,unsignedsize){map->hash_table=calloc(size,sizeof(Data));map->size=size;map->amount=0;}voidrefresh(Map*map,unsignednew_size){Data*old_...