This commit is contained in:
2023-10-23 13:23:36 +02:00
parent 667dae6f1a
commit 322b22f9bf
5711 changed files with 72953 additions and 0 deletions

BIN
DEV/DEV1.1/TP_adresses/exe Executable file

Binary file not shown.

View File

@@ -0,0 +1,20 @@
#include <stdlib.h>
#include <stdio.h>
int main(void) {
float decimal;
double decimalPrecisise;
long double grandDecimal;
char caracter;
short int petitEntier;
int entier;
long long unsigned int megaNaturel;
printf("%p\n",&decimal);
printf("%p\n",&decimalPrecisise);
printf("%p\n",&grandDecimal);
printf("%p\n",&caracter);
printf("%p\n",&petitEntier);
printf("%p\n",&entier);
printf("%p\n",&megaNaturel);
return EXIT_SUCCESS;
}

View File

View File

@@ -0,0 +1,13 @@
#include <stdlib.h>
#include <stdio.h>
int main(void) {
char min, maj;
char *p = NULL;
for(min = 'a', maj = 'A'; maj <= 'Z'; min++, maj++) {
p = (p == &min) ? &maj : &min;
putchar(*p);
}
putchar('\n');
return EXIT_SUCCESS;
}

View File

View File

@@ -0,0 +1,19 @@
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void) {
int* p;
if(time(NULL)%2) {
int x = 59;
p = &x;
printf("x=%d\n", x);
} else {
int y = 31;
p = &y;
printf("y=%d\n", y);
}
printf("%d\n", *p);
return EXIT_SUCCESS;
}

View File

View File

@@ -0,0 +1,15 @@
#include <stdlib.h>
#include <stdio.h>
int main(void) {
long long int n1 = 4614256656552045848LL;
double* p1 = (double*) &n1;
double n2 = *p1;
n2 = n2*2;
long long int* p2 = (long long int*) &n2;
long long int n3 = *p2;
double* p3 = (double*) &n3;
printf("π = %f\n", *p3);
return EXIT_SUCCESS;
}
//4614256656552045848LL

View File

@@ -0,0 +1,10 @@
#include <stdlib.h>
#include <stdio.h>
int main(void) {
long long int n = 4614256656552045848LL;
double* p = (double*) &n;
printf("π = %f\n", *p);
return EXIT_SUCCESS;
}
//4614256656552045848LL

View File

@@ -0,0 +1,31 @@
#include <stdlib.h>
#include <stdio.h>
int main(void) {
int a = 1, b = 2, c = 3;
int *p, *q;
printf(" a b c*p*q\n");
printf("1) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
p=&a;
printf("2) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
q=&c;
printf("3) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
*p=(*q)++;
printf("4) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
p=q;
printf("5) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
q=&b;
printf("6) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
*p-=*q;
printf("7) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
++*q;
printf("8) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
*p*=*q;
printf("9) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
a=++*q**p;
printf("10) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
p=&a;
printf("11) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
*q=*p/(*q);
printf("12) %d,%d,%d,%d,%d\n",a,b,c,*p,*p);
return EXIT_SUCCESS;
}

View File