TODAY JAVA SCHOOL

In java school, programming, design, computer general knowledge, web application, software, web services, social media, digital marketing, oops, concept of programming language, oops feature, console media, graphics medium, first programming, c, c ++ , Java, PHP, SQL, MySQL, HTML, HTML_5, J_query, JavaScript, Bootstrap, Framework, images with logos, examples, shared and explained.

https://www.amazon.in/b?node=26373545031&linkCode=ll2&tag=1234567801cdb-21&linkId=3b9882431b00409b44141e0344b35a15&language=en_IN&ref_=as_li_ss_tl

Breaking

Tuesday 16 June 2020

Pointer References In C++ |Pointer References In C++ Programming Language | Pointer References In C++ In Hindi

Pointer References In C++

If we declare any type of variable then we have to use address operator at  that time it  is called variable reference.

If reference variable is integer type then variable address can store, and reference variable memory allocation is  in heap.

In normal variable memory allocation is in static, its means reference variable use to copy, so that kind of variable is known as  pointer reference.

image of pointer reference in c++
Fig:Pointer References In C++ 

Example:

int  a;

a=30;

int &b=a;

 

Program:

#include<iostream.h>

#incldue<conio.h>

void main()

{

int  num;

int &num1=num;

cout<<”input a value”;

cin>>num;

cout<<”num=”<<num;

cout<<”num1=”<<num1;

getch();

}

 

Output:

input a value 2

num=2, num1=2


No comments:

Post a Comment