Wap for swapping values of two variables using pointers as arguments to functions?

1 answer

Answer

1099701

2026-10-14 16:35

+ Follow

# include<stdio.h>

# include<conio.h>

void main()

{

clrscr();

int a,b;

printf ("Enter the first value:");

scanf ("%d",& a );

printf ("Enter the second value:");

scanf ("%d",& b );

printf ("\n\nBefor swaping the values ");

printf ("\nThe first value is %d",a);

printf ("\nThe second value is %d",b);

printf ("\n\nAfter swaping the values ");

printf ("\nThe first value is %d",b);

printf ("\nThe second value is %d",a);

}

ReportLike(0)ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.