+#include <stdio.h>
+#include <stdbool.h>
+
+
+void promptValue(const char* msg, int* addr) {
+ puts(msg);
+ scanf("%d", addr);
+}
+
+void xorSwap (int *v1, int *v2) {
+ if (v1 != v2) {
+ *v1 ^= *v2;
+ *v2 ^= *v1;
+ *v1 ^= *v2;
+ }
+}
+
+void swap(int* v1, int* v2) {
+ int tmp = *v1;
+ if (v1 != v2) {
+ *v1 = *v2;
+ *v2 = tmp;
+ }
+}
+
+void displayArray(int* array, int count) {
+ for (int i = 0; i < count; i++) {
+ printf("Value in array index %d = %d\n", i, array[i]);
+ }
+}
+
+bool sortFirst(int* array, int length) {
+ for (int i = 0; i < length-1; i++) {
+ if (array[i] > array[i+1]) {
+ swap(&array[i], &array[i+1]);
+ return true;
+ }
+ }
+ return false;
+}
+
+int main() {
+ int array[5];
+ for (int i = 0; i < 5; i++) {
+ promptValue("Valeur ?", &array[i]);
+ }
+ displayArray(array, 5);
+
+ return 0;
+}