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

Saturday 20 June 2020

Independent Reference In C++| Independent Reference In C++ Programming Language|Independent Reference In C++ program | Independent Reference In C++ In Hindi

Independent Reference In C++

C++ language  of variable to reference form one or two variable use to pass.

 In independent reference for normal variable to use value of reference variable to assign it. If normal variable have any kind of change then reference variable value will  change automatic. So like that any kind of variable to reference value can change at any time, so this type of concept is known as independent reference.


image of Independent Reference In C++

Fig: Independent Reference In C++

Syntax:

datatype  variablename;

 datatype  &variable=normal variable;

 

Example:

int a;

int &b=a;

Program:

#include<iostream.h>

#inlcude<conio.h>

void main()

{

  int  a;

  int  &b=a;

cout<<”input value”;

cin>>a;

cout<<”a=”<<a;

a++;

cout<<”b=”<<b;

b++;

cout<<a;

getch();

}

Output:

Input value 45

46

47


No comments:

Post a Comment