debut TP19
This commit is contained in:
BIN
DEV1.1/TP19/date
Executable file
BIN
DEV1.1/TP19/date
Executable file
Binary file not shown.
11
DEV1.1/TP19/date.c
Normal file
11
DEV1.1/TP19/date.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
|
||||
int main(void){
|
||||
time_t times =time(NULL);
|
||||
struct tm *timeI=localtime(×);
|
||||
printf("La date est: %02d - %02d - %02d\n", timeI->tm_year + 1900,timeI->tm_mon, timeI->tm_mday);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
BIN
DEV1.1/TP19/numero
Executable file
BIN
DEV1.1/TP19/numero
Executable file
Binary file not shown.
11
DEV1.1/TP19/numero.c
Normal file
11
DEV1.1/TP19/numero.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <pwd.h>
|
||||
|
||||
|
||||
int main(void) {
|
||||
struct passwd *info=getpwnam("felix-vi");
|
||||
printf("Votre uid est %lu\n",(unsigned long) info->pw_uid);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
BIN
DEV1.1/TP19/tailles
Executable file
BIN
DEV1.1/TP19/tailles
Executable file
Binary file not shown.
14
DEV1.1/TP19/tailles.c
Normal file
14
DEV1.1/TP19/tailles.c
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct taille{
|
||||
char a;
|
||||
char b;
|
||||
char c;
|
||||
};
|
||||
|
||||
typedef struct taille e;
|
||||
|
||||
int main(void){
|
||||
printf("%lu\n", sizeof(e));
|
||||
}
|
||||
Reference in New Issue
Block a user