Creato esercizio con stringhe - nome e cognome
This commit is contained in:
0
test/gino~
Executable file
0
test/gino~
Executable file
19
test/test.c
19
test/test.c
@@ -1,12 +1,25 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
int main (int index, char** in_data){
|
||||
|
||||
char buf[50];
|
||||
fscanf(stdin,"%10[^\n]",buf);
|
||||
fprintf(stdout,"%s",buf);
|
||||
int fd;
|
||||
int data;
|
||||
void * buf;
|
||||
buf = malloc (100);
|
||||
|
||||
fd = open ("gino",O_WRONLY | O_APPEND,00700);
|
||||
lseek (fd,2,SEEK_SET);
|
||||
write (fd,(void *)"ehi",3);
|
||||
|
||||
|
||||
close(fd);
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user