Write a program to print the value of the address of the pointer to a variable whose value is input from user.
#include<stdio.h>intmain(){intx,*y;printf("Enter a number.\n");scanf("%d",&x);y=&x;printf("Value of the address of pointer of %d is %u\n",x,&y);return0;}
2.
Write a program to print a number which is entered from keyboard using pointer.
#include<stdio.h>intmain(){intx;printf("Enter a number.\n");scanf("%d",&x);printf("Value is %d\n",*(&x));return0;}
3.
Write a program to print the address of a variable whose value is input from user.
#include<stdio.h>intmain(){intx;printf("Enter a number.\n");scanf("%d",&x);printf("Address is %u\n",&x);return0;}
4.
Write a program to print the address of the pointer to a variable whose value is input from user.
5.
Write a program which will take pointer and display the number on screen. Take number from user and print it on screen using that function.
#include<stdio.h>voidprint(int*a){printf("Value is %d\n",*a);}intmain(){intx;printf("Enter a number.\n");scanf("%d",&x);print(&x);return0;}
6.
Write a program to find out the greatest and the smallest among three numbers using pointers.
Level 3
1.
Write a program to find the factorial of a number using pointers.
2.
Write a program to reverse the digits a number using pointers.