摘要: 1 #include <io_utils.h> 2 #include <string.h> 3 #include <stdlib.h> 4 5 int main() { 6 char string[] = "C, 1972; C++, 1983; Java, 1995; Rust, 2010; Ko 阅读全文
posted @ 2023-02-11 21:46 泥古拉斯赵四 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 1 #include <io_utils.h> 2 #include <string.h> 3 4 int main() { 5 char *string = "Hello World!"; 6 char *result = strchr(string, 'l'); 7 char *result_r 阅读全文
posted @ 2023-02-11 21:33 泥古拉斯赵四 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 1 #include <io_utils.h> 2 #include <stdlib.h> 3 #include <errno.h> 4 #include <time.h> 5 #include <string.h> 6 7 void SwapString(char * *first, char * 阅读全文
posted @ 2023-02-11 21:25 泥古拉斯赵四 阅读(45) 评论(0) 推荐(0) 编辑
摘要: 1 #include <io_utils.h> 2 #include <stdlib.h> 3 #include <errno.h> 4 5 int main() { 6 // PRINT_INT(atoi("1234")); // 1234 7 // PRINT_INT(atoi("-1234") 阅读全文
posted @ 2023-02-11 21:04 泥古拉斯赵四 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1 #include <io_utils.h> 2 #include <stdlib.h> 3 4 typedef struct ListNode { 5 int value; 6 struct ListNode *next; 7 } ListNode; 8 9 ListNode *CreateNo 阅读全文
posted @ 2023-02-11 20:29 泥古拉斯赵四 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1 #include <io_utils.h> 2 3 typedef enum FileFormat { 4 PNG, JPEG = 10, BMP = 20, UNKNOWN 5 } FileFormat; 6 7 FileFormat GuessFormat(char *file_path) 阅读全文
posted @ 2023-02-11 20:11 泥古拉斯赵四 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1 #include <io_utils.h> 2 3 #define OP_PRINT_INT 0 4 #define OP_PRINT_DOUBLE 1 5 #define OP_PRINT_STRING 2 6 7 typedef union Operand { 8 int int_opera 阅读全文
posted @ 2023-02-11 20:08 泥古拉斯赵四 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1 #include <io_utils.h> 2 3 int IsBigEndian() { 4 union { 5 char c[2]; 6 short s; 7 } value = {.s=0x100}; 8 9 return value.c[0] == 1; 10 } 11 12 int I 阅读全文
posted @ 2023-02-11 20:07 泥古拉斯赵四 阅读(7) 评论(0) 推荐(0) 编辑