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