Pointers
Pointers
Pointers
#include <stdio.h>
int main() {
return 0;
#include <stdio.h>
*ptr1 = *ptr2;
*ptr2 = temp;
}
int main() {
scanf("%d", &num1);
scanf("%d", &num2);
swap(&num1, &num2);
return 0;
}
3)WAP To add two numbers using pointers.
#include <stdio.h>
int main() {
scanf("%d", &num1);
scanf("%d", &num2);
return 0;
}
4)WAP To read and Display values in 1D arrays using pointer.
#include <stdio.h>
int main() {
int *ptr;
scanf("%d", &size);
scanf("%d", ptr);
printf("\n");
return 0;
#include <stdio.h>
int main() {
int number;
scanf("%d", &number);
findFactorial(number, &factorial);
int i;
*factorial = 1;
*factorial *= i;