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
Which option correctly describes a DBMS application? A. software used to manage databases B. software used to organize files and
ahrayia [7]
The answer is A.
It's a software used to manage databases


DBMS stands for DataBase Management System
4 0
3 years ago
Read 2 more answers
Tech A says that gasoline vapors are lighter than air, so inspection pits do not have a fire hazard like above ground hoists. Te
Elden [556K]

Answer:

Tech B is correct.

Explanation:

First, It is international best practice never to exceed the lifting capacity of any hoist. To do so would expose those involved to risks that may prove to be fatal.

Second, research has shown that gasoline vapors, as well as vapor from almost all other flammable or ignitable liquids or substances, are heavier than air.

More specifically, Gasoline produces flammable vapors that are heavier than air by 3 to 4 times. This means they can travel for great distances along the ground. Worst still, inspection pits are must be kept free from gas vapors because they tend to accumulate in low or enclosed spaces.

Both technicians should and must observe all occupational, health, and safety rules and guidelines stipulated and required for their industry/practice.

Cheers

4 0
2 years ago
Write the include directive that allows use of the function headers in the file myFuncs.h.
Alex787 [66]
#include "myFuncs.h" 

4 0
3 years ago
Researching the history of computers is a good troubleshooting technique.<br> True or False?
Verdich [7]

Yes very much so! You could learn previous mistakes/bugs/etc and find solutions to fixing them and avoiding getting them. As well as much more. History is always a fun subject for anything, really in my opinion.

4 0
2 years ago
When an event occurs, the agent logs details regarding the event. what is this event called?
Nimfa-mama [501]

If an event occurs, the agent logs details regarding the event. what is this event called GET.

The information in the agent log file is known to be the beginning of the log file, which is stated to show the agent's launch and handling of the services and configuration settings.

Keep in mind that the agent log also contains a history of the activities performed by the agent during runtime, along with any errors, and that it is utilised to investigate deployment issues.

As a result, if an event happens, the agent logs information about it. What is this GET event, exactly?

The agent monitoring services' startup and configuration settings are displayed at the log file's beginning. The sequence of agent runtime activity and any observed exceptions are also included in the agent log.

Learn more about agent logs:

brainly.com/question/28557574

#SPJ4

8 0
1 year ago
Other questions:
  • The "network of networks," consisting of LANs (Local Area Networksnetworks connecting two or more computers, usually within the
    5·1 answer
  • Which of the following methods for learning to use new software includes tips for using the product, updates to download, and in
    7·2 answers
  • In a distributed database system, the data placement alternative with the highest reliability and availability is Group of answe
    9·1 answer
  • What is the role of the federal government in regulating the media and the internet?
    6·2 answers
  • Write a function called show_info that takes a name, a home city, and a home state (a total of 3 arguments) and returns a full s
    12·1 answer
  • A single-user database system automatically ensures ____ of the database, because only one transaction is executed at a time.
    13·1 answer
  • Please help Ill give you brainliest if I get 2 answers. Which is used to input information on a laptop?
    6·1 answer
  • What is the CSS property used to style text as all lowercase or uppercase?
    14·2 answers
  • If you walked into a room containing three computers and were told one of them was infected with malware, how would you determin
    10·1 answer
  • Content area a leased asset will appear on the balance sheet as a long-term asset. true false'
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!