#include <stdio.h>
#include <string.h>
#include <assert.h>
//strstr 查看str1中是否有str2,有则返回str1z中
//的相同的第一字符的起始地址,没有则NULL
char* my_strstr(const char* str1, const char* str2)
{
assert(str1 && str2);
const char* s1 = NULL;
const char* s2 = NULL;
const char* cp = str1;
if (*str2=='\0')
......................
阅读全部
|
nn154189906
贴于 2022年4月19日 23:06
hide
bbsi
#include <stdio.h>
#include <string.h>
#include <assert.h>
//对strcmp进行实现和使用
// int my_strcmp(const char* str1, const char* str2)
// {
// assert(str1&&str2);
// while (*str1 == *str2)
// {
// if (*str1 == '\0')
// {
......................
阅读全部
|
nn154189906
贴于 2022年4月19日 22:12
hide
bbsi
#include <stdio.h>
#include <string.h>
#include <assert.h>
//对strcat进行使用和实现
// int main()//追加函数
// {
// char arr[20] = "hello ";
// strcat(arr, "world!");
// printf("%s", arr);
// return 0;
// }
......................
阅读全部
|
nn154189906
贴于 2022年4月19日 21:44
hide
bbsi
CODE SEGMENT
ASSUME CS:CODE
START:
MOV BX, 1000H
MOV SI, 1000H
LEA DI, [BX+SI]
MOV WORD PTR [DI], 1234H
MOV WORD PTR [DI+2], 5678H
L1: LDS BX, [DI]
MOV BX, DI
MOV AL, 3
L2: XLAT
......................
阅读全部
|
rainXsung
贴于 2022年4月19日 10:58
hide
bbsi
num=int(input("请输入一个整数:"))
if num%2==0:
print("even")
else:
print("odd"
阅读全部
|
小呆阳
贴于 2022年4月18日 17:38
hide
bbsi
print("我在中国学Python\n")
# 练习一下循环的使用
for i in range(1, 21):
print(f"我爱编程中国 {i} 次")
阅读全部
|
joy張
贴于 2022年4月18日 11:26
hide
bbsi
#include <stdio.h>
// int main()
// {
// int a[5] = {1,2,3,4,5};
// int* ptr = (int*)(&a+1);
// printf("%d %d", *(a+1), *(ptr-1));
// return 0;
// }
//杨氏矩阵,o(n)的空间复杂度,找数字
// int find_num(int arr[3][3], int r, int c, int k)
......................
阅读全部
|
nn154189906
贴于 2022年4月17日 21:44
hide
bbsi
section .data ;section declaration
msg db "Hello, 编程中国",0xA ;our dear string
len equ $ - msg ;length of our dear string
section .text ;section declaration
;we must export the entry point to the ELF linker or
global _start ;loader. They conventionally recognize _start as their
;entry point. Use ld -e foo to override the default.
_start:
;write our string to stdout
mov eax,4 ;system call number (sys_write)
mov ebx,1 ;first argument: file handle (stdout)
mov ecx,msg ;second argument: pointer to message to write
......................
阅读全部
|
暗夜之狼
贴于 2022年4月17日 13:23
hide
bbsi