#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
#include <stdio.h>
void Swap(char* buf1, char* buf2, int width)
{
int i = 0;
for (i = 0; i<width; i++)
{
char tmp = *buf1;
*buf1 = *buf2;
*buf2 = tmp;
buf1++;
buf2++;
......................
阅读全部
|
nn154189906
贴于 2022年4月16日 19:14
hide
bbsi
#include <stdio.h>
/*
函数指针、函数指针数组
*/
void menu()
{
printf("********************\n");
printf("****1.add 2.sub****\n");
printf("****3.mul 4.div****\n");
printf("********************\n");
......................
阅读全部
|
nn154189906
贴于 2022年4月16日 17:11
hide
bbsi
#include <stdio.h>
/*
函数指针、函数指针数组
*/
int add(int x, int y)
{
return x+y;
}
int sub(int x, int y)
{
......................
阅读全部
|
nn154189906
贴于 2022年4月16日 16:33
hide
bbsi
#include <stdio.h>
// int main() //猜杀手
// {
// char k = 0;
// for (k='A'; k<='D'; k++)
// {
// if((k != 'A')+(k =='C')+(k=='D')+(k!='D')==3)
// {
// printf("%c", k);
// }
// }
......................
阅读全部
|
nn154189906
贴于 2022年4月16日 16:12
hide
bbsi
#include <stdio.h>
// int main() //猜杀手
// {
// char k = 0;
// for (k='A'; k<='D'; k++)
// {
// if((k != 'A')+(k =='C')+(k=='D')+(k!='D')==3)
// {
// printf("%c", k);
// }
// }
......................
阅读全部
|
nn154189906
贴于 2022年4月15日 21:54
hide
bbsi
#include <stdio.h>
// int main()
// {
// unsigned char a = 200;
// unsigned char b = 100;
// unsigned char c = 0;
// c = a+b;
// printf("%d %d", a+b, c);
// return 0;
// }
......................
阅读全部
|
nn154189906
贴于 2022年4月15日 21:02
hide
bbsi
#include <stdio.h>
int main()
{
int money = 0;
scanf("%d", &money);
int total = money;
int empty = money;
while (empty >=2)
{
total += empty/2;
......................
阅读全部
|
nn154189906
贴于 2022年4月15日 17:42
hide
bbsi