write a program to swap the value of two variable using pointer? in 5 marks
Answers
Answered by
3
Answer:
swap 2 numbers using pointers in C
#include <stdio.h>
int main()
{
int x, y, *a, *b, temp;
printf("Enter the value of x and y\n");
scanf("%d%d", &x, &y);
printf("Before Swapping\nx = %d\ny = %d\n", x, y);
a = &x;
Similar questions