aboutsummaryrefslogtreecommitdiff
path: root/c09/ex00/ft_swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'c09/ex00/ft_swap.c')
-rw-r--r--c09/ex00/ft_swap.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/c09/ex00/ft_swap.c b/c09/ex00/ft_swap.c
new file mode 100644
index 0000000..989b2c2
--- /dev/null
+++ b/c09/ex00/ft_swap.c
@@ -0,0 +1,20 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_swap.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2019/07/11 16:18:42 by cacharle #+# #+# */
+/* Updated: 2019/07/11 16:19:31 by cacharle ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+void ft_swap(int *a, int *b)
+{
+ int tmp;
+
+ tmp = *a;
+ *a = *b;
+ *b = tmp;
+}