Exams:

MAKAUT BTech CSE

Answer:

A pointer is a variable that stores the address of some other variable, instead of data. An integer variable can store some integer value, but an integer type pointer variable can only hold the address of an integer variable. We can also access and change the value of the integer variable using the pointer.

Explanation

The “data” stored within a pointer variable is considered as an “address”.

“37, M. N. Sen Street, Kolkata 700001 ” – Is it an address or data?

When we see the above text on an envelope, the text is considered to be an address. But, if we see the same text on someone’s driving license or Adhar Card, the same text is considered to be data. Similarly, The data stored within a pointer variable is a Hexadecimal number which represents the address of some variable.

Example:

The following code snippet shows how to use a pointer.

int main(){
    int x;  // creating an integer
    int *p; // creating a pointer to integer variable
    x = 5;
    p = &x;
    printf("x contains %d at location %x", x , &x);
    printf("\n");
    printf("p contains %x at location %x", p , &p);
    printf("\nAccessing x via p:-\n");
    printf("value of x is %d", *p);
    return 0;
}
sample-output

Related Question:

  1. What is the address of any variable?
  2. Can a pointer variable store values?
  3. What type of values can be stored in a pointer variable?
  4. Can we perform addition or subtraction on pointers?
  5. What is the use of * while using pointers in C?

0 Replies to “What is a pointer variable in C?

  1. Приветики!
    Приобретите российский диплом по выгодной цене с гарантией проверки и доставкой в любой город РФ – без предоплаты!
    https://www.google.lt/url?sa=t&url=https://diploms-asx.com
    http://cse.google.ng/url?q=http://rudiplomisty24.com
    https://www.google.com.my/url?q=http://rudiplomisty24.com
    https://maps.google.cf/url?sa=t&url=http://diploms-service.com
    https://sites.google.com/view/sunwinclcomhttp://rudiplomisty24.com

    Приобретите диплом Гознака у нас по специальной цене с доставкой в любой регион России без предоплаты.

  2. Привет, дорогой читатель!
    Компания предлагает купить диплом Вуза России недорого, без предоплаты и с гарантией возврата средств.
    https://image.google.as/url?q=http://russdiplomiki.com
    http://www.google.sm/url?q=https://diplomansy.com
    http://images.google.pn/url?q=http://diplomyland.com
    https://maps.google.st/url?q=https://premialnie-diplomansy.com
    https://images.google.no/url?q=http://diploms-service.com

    У нас на сайте можно недорого заказать и купить диплом с гарантией и доставкой покупателю в любой регион РФ

  3. Добрый день всем!
    Наши услуги помогут вам приобрести диплом ВУЗа с доставкой по всей России и без предварительной оплаты – это быстро и надежно!
    https://www.google.com.ai/url?q=http://free-diplommi.com
    http://images.google.com.tj/url?q=http://free-diplommi.com
    https://images.google.so/url?q=http://rdiplomik24.com
    https://clients1.google.com.fj/url?sa=t&url=https://premialnie-diplomansy.com
    https://www.google.com.ua/url?q=http://diplomy-originaly.com

    Как можно приобрести диплом Вуза в России без предоплаты на сайте? Мы готовы доставить его в любую точку страны.

  4. Привет, дорогой читатель!
    Купите диплом института или техникума с доставкой по РФ по выгодной цене без предоплаты!
    https://cse.google.com.pe/url?q=http://russdiplomiki.com
    https://www.google.iq/url?sa=t&url=http://aurus-diploms.com
    https://maps.google.com.co/url?q=https://premialnie-diplomansy.com
    https://image.google.bs/url?q=https://russian-diplom.com
    http://cse.google.co.bw/url?sa=t&url=http://diplomy-originaly.com

    Купите диплом ВУЗа по выгодной цене с гарантией качества и доставкой в любой город России без предоплаты – просто и надежно!

  5. Привет всем!
    Приобретите диплом ВУЗа с гарантированной доставкой по России и без предварительной оплаты – надежно и выгодно!
    https://images.google.com.bz/url?sa=t&url=http://free-diplommi.com
    https://www.google.nr/url?q=http://rudiplomisty24.com
    http://toolbarqueries.google.co.ke/url?sa=i&url=http://diploms-service.com
    https://images.google.com.cy/url?q=http://diplomsagroups.com
    http://images.google.co.uz/url?sa=t&url=http://diplomrussian.com

    Приобретите диплом института или колледжа недорого с доставкой по РФ и гарантией качества без предварительной оплаты!

  6. Привет, дорогой читатель!
    Закажите диплом ВУЗа с доставкой по всей России без предоплаты и с гарантией качества!
    http://www.google.la/url?q=https://diploms-asx.com
    http://www.google.co.ao/url?q=http://aurus-diploms.com
    https://www.google.com.bd/url?q=https://anny-diploms.com
    http://cse.google.co.bw/url?sa=t&url=https://eonline-diploms.com
    https://images.google.jo/url?q=https://eonline-diploms.com

    Купите диплом ВУЗа с гарантированной доставкой в любой город России без предварительной оплаты и уверенностью в его легальности!

  7. Привет, дорогой читатель!
    Получите российский диплом с гарантированной подлинностью и доставкой по всей стране без предварительной оплаты – просто и удобно!
    http://image.google.iq/url?rct=j&sa=t&url=http://rdiplomik24.com
    https://cse.google.lv/url?q=https://diploms-asx.com
    https://www.google.de/url?q=http://diplomyland.com
    https://maps.google.gg/url?q=http://diploms-service.com
    http://www.google.com.cy/url?q=http://diploms-service.com

    Предлагаем всем желающим приобрести диплом университетов России по низкой цене с доставкой в руки под ключ

  8. Здравствуйте!
    Поможем выбрать, оформить заказ и купить диплом любого института в любом городе по самым низким ценам
    Получите российский диплом по доступной цене с гарантией прохождения проверок и доставкой в любой город РФ без предоплаты.
    https://cse.google.ci/url?q=https://originality-diploman.com
    https://images.google.co.uk/url?sa=t&url=http://diploman-spb24.com
    https://images.google.com.gi/url?sa=t&url=https://premialnie-diplomany.com
    https://cse.google.rw/url?sa=t&url=http://volga-diplomy.com
    https://www.google.com.ng/url?q=https://russiany-diplomans.com

Leave a Reply

Your email address will not be published. Required fields are marked *