jituTechnology

jituTechnology

A program to print the direct and indirect address and its content using “address of operator” and “indirection operator

A program to print the direct and indirect address and its content using “address of operator” and “indirection operator”.

Codes
/*A program to print the direct and indirect address and its content*/
/*Programed by          Jitendra Kr Yadav
                        10116
                        2 Apr,2011*/
#include<stdio.h>
#include<conio.h>
main()
{
int x;
int *pt;
printf(“Enter the number: “);
scanf(“%d”,&x);
pt=&x;
printf(“Value:\n”);
printf(“Direct value of x is %d.\n”,x);
printf(“Indirect value of x is %d.\n”,*pt);
printf(“Address:\n”);
printf(“Direct address of x is %d.\n”,&x);
printf(“Indirect address of x is %d.\n\n”,pt);
printf(“Press any key to continue…”);
getch();
}
Output
Enter the number: 5
Value:
Direct value of x is 5.
Indirect value of x is 5.
Address:
Direct address of x is 26867885.
Indirect address of x is 26867885.
Press any key to continue…
Add a comment

Comments (1)

  1. Carlo WhittenbergApril 5, 2012 Reply
    Do you guys have a twitter fan webpage? I looked for for one on twitter but could not find it, I would really like to become a fan!

Add a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

September 2019
S M T W T F S
« Jun    
1234567
891011121314
15161718192021
22232425262728
2930