1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Trava [24]
3 years ago
7

Would these statements cause an error? Why or why not? int year = 2019; int yearNext = 2020; int & ref = year; & ref = y

earNext;
Computers and Technology
1 answer:
zalisa [80]3 years ago
3 0

Answer: YES

Explanation:

int year=2019;

int yearNext=2020;

 int &ref=year;

<em>&ref=yearNext</em>; {This line leads to error as references cannot be reassigned}

(//compilation error: lvalue required as left operand of assignment

) lvalue(&ref) is not something which can be assigned.

To get this better, here are the difference between pointers and reference variables

Pointers

Pointers can be incremented

Array can be formed with pointers

Pointers can be reassigned

Pointer can be declared as void  

Reference variable

References cannot be incremented

Array cannot be formed with references

References cannot be reassigned as references shares the address of the variable its assigned

References can never be void

You might be interested in
What is the name of the first practical asymmetric cryptosystem that was created?
victus00 [196]

Answer:

I think the name is RSA

4 0
3 years ago
What are the real-life applications of coding?
oksian1 [2.3K]

Some example's of coding affecting real life:

  • Traffic Lights
  • Biometric Security
  • Robots used in factories. can work in extreme conditions.
  • Automatic Heater or Air Conditioner.
  • Expert Systems used in for Medical Use.
  • Smart Self Driving Cars
8 0
2 years ago
25% of 60 min<br> 20% of 60 min<br> 33%% of 60 min
Alexxx [7]
15
12
19.8 cool cool cool
7 0
2 years ago
These are templates or patterns that make it easier for users to enter data
kupik [55]

Answer:

A piece of code

Explanation:

8 0
3 years ago
V to "mutual funds"?
Anettt [7]

Answer:

D. All of the above.

Explanation:

The mutual funds can be affected by the market condition, and the investor's investment can be lost. It does not provide any assurance or any guarantee that the scheme targets or the goals are going to be achieved or will not be achieved. The investment of the fund is done later, and businesses are picked up according to the wishes of the investor who creates the pool.

And they can be a smart investment for young people, and they do contain the combination of various types of stocks. And they are commonly found in the retirement accounts. Hence, all of the above points are true about mutual funds.

3 0
3 years ago
Other questions:
  • The LTE (cellular telephone) standard supports only packet switching"". What cellular services are morst affected by this change
    15·1 answer
  • Your mom wants to purchase a computer. She has heard about how the Windows 8 operating system is best-geared for a touch-enabled
    8·1 answer
  • How has technology affected the way that you produce art like photographs?
    8·1 answer
  • Is it just me or is brainly not working right now? I am trying to add friends and it won't let me!
    5·2 answers
  • A growing number of large organizations have built internal Web sites that provide opportunities for online social networking am
    7·1 answer
  • Which software application offers a variety of templates for creating reports, flyers, and newsletters that you can access withi
    7·1 answer
  • You should structure the<br> first before you search for a relevant picture.
    11·1 answer
  • Which group on the home tab contains the line spacing attribute?
    7·1 answer
  • When classified data is sent over an unclassified network, what is this incident called?
    5·1 answer
  • 1. Trust can be built in a relationship if:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!