Modifications

This commit is contained in:
Geoffrey Frogeye 2016-03-09 11:10:07 +01:00
parent e280898bf4
commit 0c9e48cc41
3 changed files with 6 additions and 4 deletions

View file

@ -3,7 +3,7 @@
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#define N 10 #define N 20
int length(char* c) { int length(char* c) {
int i, len = -1; int i, len = -1;
@ -17,7 +17,7 @@ int length(char* c) {
} }
int number(char c) { int number(char c) {
return c-48; return c - '0';
} }
int atoiMaison(char* c) { int atoiMaison(char* c) {

View file

@ -29,6 +29,8 @@ int main() {
char c[N]; char c[N];
printf("Entrez du texte : "); printf("Entrez du texte : ");
scanf("%s", &c); scanf("%s", &c);
printf("Miroir : %s\n", miroir(c)); char* m = miroir(c);
printf("Miroir : %s (addresse : 0x%x)\n", m, &m);
return 0; return 0;
} }

View file

@ -1,7 +1,7 @@
all: $(patsubst %.c,%.exe,$(shell ls *.c)) all: $(patsubst %.c,%.exe,$(shell ls *.c))
%.exe: %.c %.exe: %.c
gcc $< -o $@ gcc $< -o $@ -lm
.PHONY: all clean .PHONY: all clean