diff --git a/solutions/sharafat/10/1.c b/solutions/sharafat/10/1.c new file mode 100644 index 0000000..f145b66 --- /dev/null +++ b/solutions/sharafat/10/1.c @@ -0,0 +1,18 @@ +#include + +int a = 10, b = 20; + +void swap (void) +{ + b = a + b ; + a = b - a ; + b = b - a ; +} + +int main() +{ + printf("Before swap: a = %d, b = %d\n", a, b); + swap(); + printf("After swap: a = %d, b = %d\n", a, b); + return 0; +} \ No newline at end of file