Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to print address of a variable using & operator

Posted By: Poppy Brown     Category: C Programming     Views: 3817

Write a program to print address of a variable using & operator

Code for Program to print address of a variable using & operator in C Programming

#include<stdio.h>
#include<conio.h>

void main()
{
    char a;
    int x;
    float p,q;
    a = 'A';
    x = 125;
    p = 10.25,q = 18.76;

    printf("%c is stored at addr %u.\n",a,&a);
    printf("%d is stored at addr %u.\n",x,&x);
    printf("%f is stored at addr %u.\n",p,&p);
    printf("%f is stored at addr %u.\n",q,&q);

    getch();
}
  
Share: 


Didn't find what you were looking for? Find more on Program to print address of a variable using & operator Or get search suggestion and latest updates.

Poppy Brown
Poppy Brown author of Program to print address of a variable using & operator is from London, United Kingdom.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!