main.mint main(int argc, const char * argv[]){ @autoreleasepool { /* 在ios直接调用某个对象的消息是方法有两种: 一:performselector:withOb...
分类:
其他好文 时间:
2014-09-12 15:00:43
阅读次数:
205
#include "elf.h"
#include
int main(int argc, char *argv[])
{
FILE *fp;
int i = 0;
int fd = 0;
Elf64_Ehdr ehdr;
if ((fp=fopen(argv[1],"r"))==NULL)
{
...
分类:
其他好文 时间:
2014-09-12 08:55:03
阅读次数:
259
#include "elf.h"
#include
int main(int argc, char *argv[])
{
FILE *fp;
int i = 0;
int fd = 0;
Elf64_Ehdr ehdr;
if ((fp=fopen(argv[1],"r"))==NULL)
{
...
分类:
其他好文 时间:
2014-09-12 08:54:53
阅读次数:
183
//检查打开的文件是不是ELF格式的文件
//检验ELF头
//获得节头表的地址
//遍历节头表,依次查看一个节的属性,从节头字符串表中找到其名称,如果名称和“特别”的section名匹配,则找到此节的地址
//提取“特别”的节中的信息
//显示上面提取的信息
#include
#include
#include
#include
int main(int argc,char...
分类:
其他好文 时间:
2014-09-12 08:54:43
阅读次数:
220
#include
#include
#include
int main(int argc, const char *argv[])
{
int x, y;
x = y = 0;
printf("%d %d %d\n", ++x, ++x, ++x);
printf("%d %d %d\n", y--, ++y, y);
return 0;
}...
分类:
其他好文 时间:
2014-09-11 22:27:02
阅读次数:
189
项目一 helloworld整个基础上仅有一个helloworld.c文件,功能也非常简单,只是向屏蔽输出一句hello。新建一个helloworld目录,然后在里面新建一个文件helloworld.c,内容为:#include int main(int argc, char **agrv){ .....
分类:
其他好文 时间:
2014-09-11 22:15:42
阅读次数:
292
1.蛇形方阵:
1 2 3
6 5 4
7 8 9
外层控制层数,内层根据列数控制方向:0 则往右走 N-1则往左走
#include
#include
#include
#define SIZE 100
int a[SIZE][SIZE];
int main(int argc, const char ...
分类:
其他好文 时间:
2014-09-11 19:30:22
阅读次数:
199
//学生结构体typedef struct student{ char name[20]; //姓名 char sex; //性别 int age; //年龄}Student;int main(int argc, const char * argv[])...
分类:
其他好文 时间:
2014-09-11 19:00:22
阅读次数:
159
一般简单的C++程序,main函数的写法都是 int main() {... ; return 0;},但是,如果在运行程序时需要有参数输入,可以是使用将主函数写成int main(int argv, char** argv)的形式。如测试程序如下:#include using namespace ...
分类:
其他好文 时间:
2014-09-09 22:46:59
阅读次数:
171
针对main函数的运行时stack的分析
这里需要特殊说明的是运行环境是64-bits的Ubuntu.编译器是gcc
测试用代码:
int main(int argc,char* argv[])
{
int array[10];
array[0] = 10;
array[9] = 9;
return 0;
}...
分类:
其他好文 时间:
2014-09-09 12:53:08
阅读次数:
114