How to write a C Program Pointer Example in C Programming Language ?
Solution For C Program :
//C Program Pointer Example.
#include <stdio.h>
void swap(int *a, int *b){ // Declaration *: Declared Index
int temp = *a; // Value*: Variables to get in that position through the memory location
*a = *b;
*b = temp;
}
int main(){
int a, b;
scanf("%d%d", &a, &b);
swap(&a, &b); // Fetch&: Get the memory location variables
printf("%d\n%d\n", a, b);
return 0;
}