I have a variable and set it equal to 5. 1 then send it as an argument to a function that adds 5 to the variable passed in. Outside the function print the variable (after the function executes).
What will it print?
A. 5+1
B. 4
C. 6
D. 5

Answers

Answer 1

Answer:

D. 5

Explanation:

If the variables original value was 5 then the value that will be printed is 5. This is because the variable is being passed as a parameter into the function and 5 is being added to the parameter value, not the actual global variable outside. Therefore, in order for the adjusted value to be printed then that new value that is returned by the function needs to be saved in a new variable. This can be seen in the example code below.

I Have A Variable And Set It Equal To 5. 1 Then Send It As An Argument To A Function That Adds 5 To The

Related Questions

In our discussion of Computer Hardware, we talked about three essential hardware components that are there inside every computer. Name them and explain the significance of each in the working of the computer. Why is a 64 bit processor better than a 32 bit processor

Answers

Answer:

CPU, RAM, and Storage

Explanation:

The three hardware components that are inside every computer and are essential for it to function are CPU, RAM, and Storage (HDD, SSD). CPU is basically the brain of the computer where everything is calculated. The RAM is the memory that stores temporary information. Lastly, the Storage device is where the entire operating system and persistent data will be saved and accessed from. 64-bit processors are better simply because they can access more memory at any given time and therefore allows it to manipulate more data at the same time.

Oops, we made a mistake: we created a key "short" and gave it the value "tall", but we wanted to give it the value "long" instead. Write the line of code that will change the value associated with the key "short" to "long".

Answers

Be consistent in whether you use single or double quotes to declare your strings: our autograder assumes you'll be consistent.

Prepare an algorithm and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50..

Answers

Prepare an algorithm and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50..





Answer is in the picture

How do operating system work?

Answers

Answer:

The "operating system" manages software and hardware on the computer. Uploads files, has great memory and processes management.

a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The marketing department has collected reader survey records containing the age, gender, marital status, and annual income of readers. Design an application that allows a user to enter reader data and, when data entry is complete, produces a count of readers by age groups as follows: younger than 20, 20-29, 30-39, 40-49, and 50 and older. b. Modify the Daily Life Magazine program so that it produces a count of readers by gender within age group-that is, under-20 females, under-20 males, and so on. c. Modify the Daily Life Magazine program so that it produces a count of readers by income groups as follows: under $30,000, $30,000-$49,999, $50,000-$69,999, and $70,000 and up.

Answers

Answer:

uh

Explanation:

Will mark Brainliest, need help ASAP!

Sherman needs to set up machines to send out updates about routing information using a multicast address. What does he need to configure?

RIPv1 class D of 224
RIPv1 class D of 240
RIPv2 class D of 224
RIPv2 class D of 240

Answers

Answer:

What Sherman needs to configure is:

RIPv2 class D of 240.

Explanation:

Multicast messages are usually dispatched to a select group of hosts on a network and require acknowledgement of the recipients. RIPv2 is a router-based internet protocol for exchanging routing information to the IP address 224.0. 0.9 on a network. It determine the most efficient way to route data on a network and to prevent routing loops.

Answer:

C. RIPv2 class D of 224

Explanation:

A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are:
1) If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
2) If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
3) If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
4) The year is a leap year (it has 366 days).
5) The year is not a leap year (it has 365 days).
Some example leap years are 1600, 1712, and 2016.
Write a program that takes in a year and determines whether that year is a leap year.

Answers

Answer:

The program in Python is as follows:

year = int(input("Year: "))

print(year,end=" ")

if (year % 4) == 0:

  if (year % 100) == 0:

      if (year % 400) == 0:

          print("is a leap year")

      else:

          print("is not a leap year")

  else:

      print("is a leap year")

else:

  print("is not a leap year")

Explanation:

This gets input for year

year = int(input("Year: "))

This prints the year, input by the user

print(year,end=" ")

Check if year is divisible by 4 --- step 1

if (year % 4) == 0:

If step 1 is true, check if year is divisible by 100 -- step 2

  if (year % 100) == 0:

If step 2 is true, check if year is divisible by 400 -- step 3

      if (year % 400) == 0:

If yes, print leap year --- step 4

          print("is a leap year")

      else:

If otherwise, print not leap year --- step 5

          print("is not a leap year")

If step 3 is not true, print leap year

  else:

      print("is a leap year")

If step 1 is not true, print not leap year

else:

  print("is not a leap year")

List the components of a typical operating system and summarize the role of each in a single phrase.

Answers

Answer:

The answer is below

Explanation:

There are several components of operating systems, this may be based on the specific types of Operating systems. However, here are some of the major components.

1. Kernel: it delivers the primary level of control on all the computer peripherals.

2. Process Execution: it serves as a connection between the hardware and application program

3. Interrupt: it provides a dependable technique for the OS to transmit & respond to their surroundings.

4. Memory Management: it regulates main memory and then moves processes between disk & main memory during implementation.

5. Multitasking: it interprets the activities of many independent computer programs on a similar computer system.

6. Networking: it defines the interaction of processor through communication lines

7. Security: it protects the activities of other processes going in the system

8. User Interface: it provides permission for a computer operator to get the information.

The development of the modern computer system has been evolutionary. Discuss this phenomenon and further discuss how current trends in computing would impact future computer systems development

Answers

Answer:

The modern computer system has been evolutionary. Modern computers have allowed for us to complete hard tasks rather easily. With modern computers, we are able to calculate advanced equations with the click of a button. Trends in computing like RTX can rapidly improve performance, rendering, and tons of other graphical heavy actions. In September of 2018, we got the first RTX card, now in 2021, RTX has become exponentially better than what it was in 2018. With the modern computers comes quantum computers. Quantum computing is estimated to be 100 million times faster than any modern computer. IBM, the company to make the first computer stated that we are in the decade of quantum computing. And who knows? Maybe quantum computing will come sooner rather than later.

Explanation:

You probably should modify this a little so you don't get in trouble. I researched each topic I put into this for about an hour so I hope this is what you need. If it isn't, please don't hesitate to tell me what I didn't add or what went wrong.

Have a good day :)

Write a MIPS assembly language program that finds maximum element in an array of integers. Print the Result Array. You do not need to read elements of array from keyboard, Just declare them.

Answers

Answer and Explanation:

The program using Assembly language to calculate maximum value in array is given as below:

.data

space: .asciiz " "

X: .word 31, 17, 92, 46, 172, 208, 13, 93, 65, 112

N: .word 10

.text

main: la $a0, X #$a0=load address of array X

lw $a1, N #$a1=10 --number elements

jal readArray #call readArray

li $v0, 10 #exit program

syscall

readArray:

li $t0, 0 #$t0=0

li $t1, 0 #$t1=0

buc: bge $t0, $a1, final #if $t0 >= $a1 then goto final

lw $a0, X($t1) #$a0 = X(i)

li $v0, 1 #Print integer

syscall

la $a0, space #load a space: " "

li $v0, 4 #print string

syscall

addi $t1, $t1, 4 #Every 4 bytes there is an integer in the array

addi $t0, $t0, 1 #$t0=$t0+1

b buc #goto buc

final:

jr $ra #return

The algorithm which are the steps used above is:

Declares array of integers

Calls declared array

Reads declared array and compares integer values stored with if statements to make swap

prints array

Exits

Write a demo test to verify the above Rectangle object accessible from demo test main program and can execute display() method to output.

Answers

Answer:

Explanation:

The Rectangle class was not provided in this question but after a quick online search I was able to find the class code. Due to this I was able to create a test code in the main Method of my program to create a Rectangle object and call it's display() method. The Test code and the output can be seen in the attached image below. While the code below is simply the Main Test Program as requested.

class Brainly {  

   public static void main(String[] args) {

       Rectangle rectangle = new Rectangle(20, 8);

       rectangle.display();

   }

}

A technician is setting up a VM for use in testing software deployments. The VM is offline, but the hypervisor is not. Which of the following settings should the technician change to resolve this issue

Answers

Answer:

The answer might be C.

Explanation:

Virtualization software (hyper-v, vm ware, virtual box) has a power button to power on the virtual machine, so in the real world you would press the power button. But the virtual CPU is the closet thing to a power button.

the right answer might be c

which is better microprocessor or vacuum tube explain​

Answers

Answer:

explain the role importance of communication in economic development of Nepal?

Describe in your own words the two main data integrity constraints that we learnt in our discussion of databases. Provide your own examples of their use.

Answers

Answer:

Domain integrity constraint and Entity integrity constraint

Explanation:

Data integrity constraints protect the quality of data by ensuring data doesn't lose its integrity, validity, or consistency when there is update to data. Data integrity constraints are rules applied to table columns in DBMS systems to prevent any unintentional damage to data. There are four types of data integrity constraints: domain integrity constraint, entity integrity constraint, referential integrity constraint, and key constraint.

Domain integrity constraint applies rules to protect against the values or attributes in the table column.

Entity integrity constraint applies rules to protect the uniqueness of rows in the table.

Keely has an automation tool in place that runs a number of different processes for her and has for the last two years. All of a sudden it stops working and generates an error message that the account has been locked. Which of the following is the best possible reason why?

a. The password has expired.
b. The IP address of the server the process is typically accessing has changed. *
c. The ACL with the allowed list of users has changed.
d. Someone has tried to hack into the system using that account.

Answers

Answer:

b. The IP address of the server the process is typically accessing has changed

Explanation:

IP address stands for Internet Protocol address. It refers to a numerical value which is assigned to a every device which is connected to a computer network using the internet protocol for any communication.

Every device is allotted a unique IP address number.

In the context, Keely who works on an automation tool suddenly gets an error message that the account has been locked. This is mainly due to the changed in the IP address of the server that accesses the process.

The account gets closed or clocked whenever the IP address of the server changes.

Therefore, the correct option is (b).

CC stand for.....in the email platform?

Answers

CC stands for Carbon Copy in emails.

Along with the "To" field of an email, you will usually have a place to enter email addresses in a CC field. CC stands for "carbon copy."

Hope this helps! Please mark me as brainliest!

Have a wodnerful day!

Write a line of code to create a constant called MAX that will hold the size of an array that can store up to 25 decimal values. Separate each item with 1 space, and end the line with a semi-colon.

Answers

Answer:

A line of code to create a constant called MAX that will hold the size of an array that can store up to 25 decimal values. Separate each item with 1 space, and end the line with a semi-colon.

Here,

const int MAX = 25;

Aside from human user types, there are nonhuman user groups. Known as account types, __________ are implemented by the system to support automated services, and __________ are accounts that remain nonhuman until individuals are assigned access and can use them to recover a system following a major outage.

Answers

Answer:

The answer is "System accounts and contingent ID".

Explanation:

The system accounts are indeed a user account established after installation by an operating system and used for just a specific os objective.

The Contingent IDs are established as identities just at an initial stage but remain unattached until there is a serious power failure. Individuals access to them after any breakdown and they'll become active and is used by people.

Brandon has configured one of the applications hosted on his cloud service provider to increase the number of resources as needed. Which of the following describes this capability?

a. Continuity
b. Adaptability
c. Vertical scaling
d. Horizontal scaling

Answers

Answer:

The description of this capability is:

d. Horizontal scaling

Explanation:

The capability that Brandon has achieved is horizontal scaling, which involves the increasing of the resources of cloud applications to meet his increasing demand for cloud services.  Vertical scaling involves the addition or subtraction of power to a cloud server, which practically upgrades the memory, storage, or processing power.  But to scale horizontally, more resources are added or subtracted.  The purpose of horizontal scaling is to spread out or in the workload of existing resources and either increase or decrease overall performance and capacity.

1. You purchase a new desktop computer that does not have wireless capability, and then you decide thar you want to use a wireless connection to the internet. Give two solutions to upgrade your system to wireless.
2. You are replacing a processor on an older motherboard and see that the board has the LGA1155 socket. You have three processors on hand: Intel Core i3-2100, Intel Core i5-8400, and Intel Core i5-6500. Which of these three processors will most likely fit the board? Why?a. 4.b. 5.c. 6.d. 7.

Answers

Answer:   1.)  You can use a USB WiFi adapter, install a dedicated PCIe WiFi card, or upgrade to a new motherboard with built-in WiFi. (That's three solutions but just want to give you flexibility with your problem.)

Answer:    2.)  None of the processors would fit because they all have different series sockets. (The i5 processors have LGA1151 sockets and the i3 has an LGA1156 socket.)

Explanation: 1.)  Usb WiFi adapter, dedicated PCIe WiFi card, OR a new motherboard with built-in WiFi

                     2.)  None of the processors work

Which port on the back of a PC’s system unit is used for network connection?

Answers

Answer:

I think the answer is USB Ports

Many variables of the same Type, having the same Name, grouped together and referenced via an integer value constitute: a. a class. b. an array. c. a struct. d. a pointer. e. none of these.

Answers

Answer:

b. an array.

Explanation:

An array can be defined as a set of memory locations (data structure) that comprises of a group of elements with each memory location sharing the same name. Therefore, the elements contained in array are all of the same data type e.g strings or integers.

Basically, in computer programming, arrays are typically used by software developers to organize data, in order to search or sort them. Also, the elements of an array are always stored in contiguous memory locations.

Basically, it's a data structure which comprises a fixed-size collection of variables each typically holding a piece of data and belonging to the same data type such as strings or integers.

In Computer programming, when more than one variable of the same type, having the same name, are grouped together and referenced via an integer value, it constitute an array.

This ultimately implies that, when a programmer wishes to store a group of related data (elements) of the same type, he or she should use an array.

A or an is a simple chip with two or more processor core

Answers

a multi-core processor, i’m pretty sure

Leo is planning the new backup strategy for a subsidiary his company is purchasing that does not currently have a backup strategy in place. He decides that a full backup should be run once per week. Once per day, everything that has changed since the last full backup will be archived. Once per hour everything that has changed since the last backup of any type will be backed up. Which of the following describes the backups that will be run every hour?

a. Differential
b. Variable
c. Incremental
d. Flexible

Answers

Answer:

C. Incremental backup

Explanation:

An incremental backup is a type of backup where the succeeding copies of the data is made up of only those positions that have changed since the previous or prior copies were made. Such backups are desired since they limit the usage of space for storage and these types of back ups are faster to do that the differential backup.

When we bring this explanation to this question, we can easily see that the backup that is being carried out is done on everything that has changed since the last backup (previous backup). Therefore this is an incremental backup.

Define that function in a program whose inputs are the car's miles/gallon and the gas dollars/gallon (both floats). Output the gas cost for 10 miles, 50 miles, and 400 miles, by calling your DrivingCost function three times.
Ex: If the input is 20.0 3.1599, the output is:
Write a function DrivingCost with parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar cost to drive those miles. All items are of type float.
Ex: If the function is called with 50 20.0 3.1599, the function returns 7.89975.

Answers

Answer:

Explanation:

The following is written in Java. The first DrivingCost function requested in the question cannot be made and will not work because the cost cannot be calculated without the miles driven being input as a seperate variable. The second DrivingCost function with all three variables was created and tested using the example in the question. The test and output can be seen in the attached image below highlighted in red.

   public static float DrivingCost(float drivenMiles, float milesPerGallon, float dollarsPerGallon) {

       float gallonsUsed = drivenMiles / milesPerGallon;

       float cost = dollarsPerGallon * gallonsUsed;

       return cost;

   }

Create a program that loads a list of 7 integers. Your program will need to accept each number as an input value. There is no prompt for your input statement. Finally your program needs to print the list.

Answers

Answer:

Explanation:

The code below was coded in Java. It uses a loop to read 7 input integers and saves each one in an ArrayList called myList. Then it uses the Arrays built-in Java class to print out all the values in the arraylist. The code is tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       ArrayList<Integer> myList = new ArrayList<>();

       for (int i = 0; i< 7; i++) {

           int num = in.nextInt();

           myList.add(num);

       }

      System.out.println(Arrays.toString(myList.toArray()));

   }

}

In MS_Excel , assume you have data base of employees with their ages,How you could checked the employee is continuous in work or not depending on his age? A) By using AND function. B) By using IF function. C) By using OR function. D) By using IF and AND functions

Answers

Answer:

C) By using OR function

Explanation:

Given

Employees database

Required

Check for employees that are continuous in work or not depending on age

The solution to this question lies in the question itself.

From the question, we are to check for

....employees that are continuous in work or not depending on age

Notice that the question does not imply the usage of an if-function but, the usage of an or function as indicated by the text in bold.

So.

If an employee is continuous in work, the function will return true

If an employee does not depend on age limit, the function will return true

The function will return false, if both conditions are not true

Viết chương trình nhập vào họ tên của bạn rồi in nội dung chuỗi đó lên màn hình.Ví dụ:Nếu họ tên nhập vào là: NGUYEN BINH MINH thì kết quả màn hình như sau

Answers

Why people spam this nugen thing

Calculate the number of telephone
towers required to cover the entire
Country asurning the entire country is
interconnected to provide network
coverage

Answers

Answer:

yho

Explanation:

hayi no ntwana.... lala boy

The enhanced for loop _____ Group of answer choices reduces the number of iterations necessary to visit all elements of an array prevents incorrectly accessing elements outside of an array's range can be used to replace any regular for loop while yielding less code creates a copy of an existing array and iterates through the copy's elements

Answers

Answer:

prevents incorrectly accessing elements outside of an array's range.

Explanation:

The enhanced for loop prevents incorrectly accessing elements outside of an array's range. This type of loop is also called a For Each Loop. This is because this loop automatically loops through each element in the given array and grabs that element, then it performs whatever instructions are inside of the loop's body to that element before moving on to the next available element. This way there is no numbered indexing that needs to be provided and therefore prevents the loop from accidentally trying to access an index that does not exist in the array.

Other Questions
ou need to implement a wireless network link between two buildings on a college campus. A wired network has already been implemented within each building. The buildings are 100 meters apart. Which type of wireless antenna should you use on each side of the link What is the 38th parallel?A. The line on which Berlin was split into East and WestB. The line on which Korea was split into North and SouthC. The border between the United States and MexicoD. The site of major trench warfare between France and Germany What Poland has achieved self-government and can enjoy its _____ since the collapse of the Soviet Union Heather and Mike share the household chores as equally as possible. They take turns with the cooking and driving their son to daycare. Both of them work outside the home, and each of them takes responsibility for child care one night a week to give the other one a break. We can say that their relationship has a high level of ________. 1) What is the common difference of the arithmetic sequence 5, 8, 11, 14? 6g+5 =-2(1+2g)------------------ The Phillips curve was ________. Group of answer choices all of the choices are correct. adopted by economic policy teams in the Kennedy and Johnson administrations discredited in the 1970s, when both inflation and unemployment were relatively high influential in efforts to bring the unemployment rate down to low levels Given m|n, find the value of x.(6x+9)(4x-19)Answer:Submit Answerattempt i out of 2I NEED HELP PLS After phosphates and nitrates have entered a watersystem, identify the correct steps of Eutrophication.I. Oxygen levels dropII. Underwater plants dieIII. Fish and invertebrates dieIV. Algae grows rapidlyA. II, III, IV, IB. IV, II, I, IIIC. I, III, IV, IID. III, II, I, IV Environmental scientists are unconcerned with methods to preserve natural resources.Please select the best answer from the choices providedTF d =(3(23))2+(252)2 All quesions please. As fast as possible would be nice giving me the points are enough 956r + 47r_ degrees help please quickshannamamamamamamma Find the missing segment in the image below Find the output, hhh, when the input, ttt, is 353535.h = 50 - \dfrac{t}{5}h=50 5t h, equals, 50, minus, start fraction, t, divided by, 5, end fractionh= how does cheerfulness makes us healthy? 'Development of human resource develops the nation' Justify it. a car averaged 72 kph .on a trip if the car travelled for 9 hours how far did it go