自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 【前端】数据结构

【前端】数据结构

2022-10-12 20:23:09 1903 1

原创 readelf命令

readelf命令,一般用于查看ELF格式的文件信息,常见的文件如在Linux上的可执行文件,动态库(*.so)或者静态库(*.a)等包含ELF格式的文件。symbols.c#include <stdio.h>int time;int foo(int a) { int b = a + 1; return b;}int main(int argc...

2019-12-07 22:50:44 1385

原创 dup和dup2

1.dup2#include "csapp.h"int main(int argc, char *argv[]){ int fd1, fd2, fd3; char c1, c2, c3; char *fname = argv[1]; fd1 = open(fname, O_RDONLY, 0); fd2 = open(fname, O_RDONL...

2019-12-06 17:43:43 178

原创 一个进程调用fork函数创建一个新的子进程。

fork函数中最重要的是:fork()函数被调用一次,却会被返回两次,返回两次的区别,子进程返回的是0,而父进程返回的是子进程的ID。若调用错误则返回-1。1.Fork.c1.Fork.c#include "csapp.h"/* $begin fork *//* $begin wasidefork */int main(int argc, char *argv[]) { ...

2019-12-05 13:12:14 2346 1

原创 locate.c程序gcc运行结果

#include <stdlib.h>#include <stdio.h>#include <unistd.h>static void show_pointer(void *p, char *descr) { // printf("Pointer for %s at %p\n", descr, p); printf("%s\t%p...

2019-05-23 22:20:49 135

原创 bufdemo.c程序gcc运行结果

/* Demonstration of buffer overflow */#include <stdio.h>#include <stdlib.h>/* Implementation of library function gets() */char *gets(char *dest){ int c = getchar(); char *p = de...

2019-05-23 21:48:17 148

原创 runaway.c程序在gcc上运行结果

/* Example of deep recursion */#include <stdio.h>#include <stdlib.h>int recurse(int x) { int a[1<<15]; /* 4 * 2^15 = 64 KiB */ printf("x = %d. a at %p\n", x, a); ...

2019-05-23 21:25:45 168

原创 sq.c程序的gcc运行结果

#include <stdio.h>#include <stdlib.h>int sq(int x) { return x*x;}int main(int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) { int x = atoi(argv[i]); int s...

2019-05-18 13:31:18 304

原创 show byte程序gcc运行结果

/*prints byte representation of data *//* $begin show-bytes */#include <stdio.h>/* $end show-bytes */#include <stdlib.h>#include <string.h>/* $begin show-bytes */typedef uns...

2019-05-18 13:19:38 371

原创 struct 程序gcc运行结果

#include<stdio.h>#include<stdlib.h>typedef struct{ int a[2]; double d;}struct_t;double fun(int i){ volatile struct_t s; s.d = 3.14; s.a[i] = 1073741824;/*Possibly ou...

2019-05-18 13:09:44 239

原创 fsum.c程序gcc的运行结果

#include <stdio.h>#include <stdlib.h>#include <string.h>#define BUFSIZE 256int main(int argc, char *argv[]) { char prefix[BUFSIZE]; char next[BUFSIZE]; int i; floa...

2019-05-18 13:03:00 231

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除