xxxxxxxxxx
// C++ Program to demonstrate
// Passing of references as parameters
#include <iostream>
using namespace std;
// Function having parameters as
// references
void swap(int& first, int& second)
{
int temp = first;
first = second;
second = temp;
}
// Driver function
int main()
{
// Variables declared
int a = 2, b = 3;
// function called
swap(a, b);
// changes can be seen
// printing both variables
cout << a << " " << b;
return 0;
}
xxxxxxxxxx
int x = 5;
int &y = x;
cout << "The value of x is " << x << endl;
cout << "The value of y is " << y << endl;
y++;
cout << "The value of x is " << x << endl;
cout << "The value of y is " << y << endl;
xxxxxxxxxx
resource "aws_route_table" "example" {
vpc_id = aws_vpc.example.id
route {
cidr_block = "10.0.1.0/24"
gateway_id = aws_internet_gateway.example.id
}
route {
ipv6_cidr_block = "::/0"
egress_only_gateway_id = aws_egress_only_internet_gateway.example.id
}
tags = {
Name = "example"
}
}