Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- SQL
- Linux
- 웹해킹
- sqli
- 운영체제
- rubiya
- SQL Injection
- 알고리즘
- webhacking.kr
- 프로세스
- Python
- CODEGATE
- XSS
- hacking
- 해킹
- 시스템프로그래밍
- webhackingkr
- ctf
- 시스템
- Writeup
- crosssitescripting
- ubuntu
- web
- CCE
- SQLInjection
- 상호배제
- Los
- 화이트햇콘테스트
- WebHacking
- lordofsqlinjection
Archives
- Today
- Total
One_Blog
C - 시스템 프로그래밍 예제 - 2 [시스템 프로그래밍] 본문
728x90
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<fcntl.h>
#include<unistd.h>
#include<string.h>
int main(int argc,char **argv)
{
if(argc!=2) exit(0);
file1(argv[1]);
}
void file1(char *filename)
{
int fd = open(filename,O_RDWR|O_CREAT, 0644);
char a[1024] = "01234567890123";
write(fd, a, 10);
close(fd);
fd = open(filename, O_RDWR, 0644);
char b[1024]={};
read(fd,b,6);
close(fd);
printf("%s\n",b);
}
'알고리즘' 카테고리의 다른 글
백준 1707 - 이분 그래프 (0) | 2023.06.21 |
---|---|
C - 시스템 프로그래밍 예제 - 3 [시스템 프로그래밍] (0) | 2023.03.17 |
C - 시스템 프로그래밍 예제 - 1 [시스템 프로그래밍] (0) | 2023.03.17 |
C - 파일에 글 쓰고 알파벳 갯수 세기 [시스템 프로그래밍] (1) | 2023.03.17 |
이중 연결 리스트 - C언어 구현 (2) | 2022.11.16 |