aboutsummaryrefslogtreecommitdiff
path: root/exam02/rendu/ft_swap
diff options
context:
space:
mode:
Diffstat (limited to 'exam02/rendu/ft_swap')
-rwxr-xr-xexam02/rendu/ft_swap/ft_swap.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/exam02/rendu/ft_swap/ft_swap.c b/exam02/rendu/ft_swap/ft_swap.c
new file mode 100755
index 0000000..acf1212
--- /dev/null
+++ b/exam02/rendu/ft_swap/ft_swap.c
@@ -0,0 +1,20 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_swap.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: exam <marvin@42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/19 17:05:36 by exam #+# #+# */
+/* Updated: 2019/07/19 17:06:14 by exam ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+void ft_swap(int *a, int *b)
+{
+ int tmp;
+
+ tmp = *a;
+ *a = *b;
+ *b = tmp;
+}