Commit c1613867 authored by Son Pham's avatar Son Pham

Activity15 done

parent a250ff9f
* Name: Son Pham
* Class: CSCI 315
* Prof: Luiz Felipe Perrone
* activity15.c
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
struct account {
int id;
char name[80];
double balance;
int main() {
int fd = open("output.txt", O_CREAT | O_RDWR);
char name[80] = "Son Pham";
struct account ac1 = {11381000, "Son Pham", 1000000};
write(fd, &ac1, sizeof(ac1));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment