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
Mnenie [13.5K]
3 years ago
6

Given the function definition void something ( int a, int& b ) { int c; c = a + 2; a = a* 3; b = c + a; } what is the output

of the following code fragment that invokes something? (All variables are of type int.) r = 1; s = 2; t = 3; something(t, s); cout << r << ' ' << s << ' ' << t << endl;
Computers and Technology
1 answer:
timurjin [86]3 years ago
8 0

Answer:

1 14 3

Explanation:

If that code fragment is put under a main() function and then it will yield the above output. According to the function something(), only changes in value second parameter will be reflected and first will be unchanged because second is passed by reference and the first one is passed as value so only address of 's' is passed, so, only its value is changed and the rest are same.

You might be interested in
Write a method called findNames that meets the following specs: It takes two arguments: a list of strings, allNames, and a strin
Anna11 [10]

Answer:

public class Solution {

   public static void main(String args[]) {

       String[] allNames = new String[]{"Bob Smith", "Elroy Jetson", "Christina Johnson", "Rachael Baker", "cHRis", "Chris Conly"};

       String searchString = "cHRis";

       

       findNames(allNames, searchString);

   }

   

   public static void findNames(String[] listOfName, String nameToFind){

       ArrayList<String> resultName = new ArrayList<String>();

       

       for(String name : listOfName){

           if (name.toLowerCase().contains(nameToFind.toLowerCase())){

               resultName.add(name);

           }

       }

       

       for(String result : resultName){

           System.out.println(result);

       }

   }

}

Explanation:

The class was created called Solution. The second line define the main function. Inside the main function; we initialized and assign an array called allNames to hold the list of all name. Then a String called searchString was also defined. The searchString is the string to search for in each element of allNames array. The two variables (allNames and searchString) are passed as argument to the findNames method when it is called.

The method findNames is defined and it accept two parameters, an array containing list of names and the name to search for.

Inside the findNames method, we initialized and assigned an ArrayList called resultName. The resultName variable is to hold list of element found that contain the searchString.

The first for-loop goes through the elements in the allNames array and compare it with the searchString. If any element is found containing the searchString; it is added to the resultName variable.

The second for-loop goes through the elements of the resultName array and output it. The output is empty if no element was found added to the resultName variable.

During comparison, the both string were converted to lower case before the comparison because same lowercase character does not equal same uppercase character. For instance 'A' is not same as 'a'.

8 0
3 years ago
Stonewalling sends a(n) ______ message to the other person.a. assertive messageb. confirmingc. disagreeingd. disconfirminge. com
schepotkina [342]

A financing fee is computed by taking your annual percentage rate, or APR, the amount you owe, and the time period into account.

<h3>What is finance charge of credit card?</h3>

The interest you'll pay on a loan is defined as a finance charge, and it's most commonly used in the context of credit card debt. A financing fee is computed by taking your annual percentage rate, or APR, the amount you owe, and the time period into account.

Given that,

Interest rate = 15.5%

Date: 1-3 (3 days)

Average daily balance = amount paid × day

 = $200 × 3 = $600  

Date: 4-20 (17 days)

Average daily balance = amount paid

= $300 × 17 = $5100  

Date: 21-30 (10 days)

Average daily balance = amount paid × days

= $150 × 10 = $1500  

So, total average daily balance for the month

= $(600+5100+1500)

= $7200

Now, the finance charge = $7200 × (15.5÷1

  = $93.00

Therefore, A financing fee is computed by taking your annual percentage rate, or APR, the amount you owe, and the time period into account.

To know more about finance charge refer to,

brainly.com/question/22717601

#SPJ1

6 0
1 year ago
Donnell backed up the information on his computer every week on a flash drive. Before copying the files to the flash drive, he a
lubasha [3.4K]

Answer:

b. Risk of a potential breach in the integrity of the data on the flash drive

Explanation:

The corrupted or unreadable file error is an error message generated if you are unable to access the external hard drive connected to the system through the USB port. This error indicates that the files on the external hard drive are no longer accessible and cannot be opened.

There are several reasons that this error message can appear:

  • Viruses and Malware affecting the external hard drive .
  • Physical damage to external hard drive or USB memory .
  • Improper ejection of removable drives.
3 0
3 years ago
I am trying to go into my outlooks, email but it says. :-( Something went wrong You're currently signed in as ||my hotmail|| . P
Ksju [112]

Answer:

ok???

Explanation:

4 0
2 years ago
What data unit is encapsulated inside a packet?
Rom4ik [11]

Answer:

The Datalink layer encapsulates each packet in a frame which contains the hardware address (MAC) of the source and destination computer (host) and the LLC information which identifies to which protocol in the prevoius layer (Network layer) the packet should be passed when it arrives to its destination.

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Yesterday Hunter's laptop screen appeared to go black. The laptop was still running, but he could not see the desktop or any gra
    9·1 answer
  • Why are application programs stored in main memory​
    11·1 answer
  • Which type of disk uses primary partitions, extended partitions, and logical drives to organize data?
    9·1 answer
  • In addition to telling you which programs are currently running, what other information does the task bar display
    10·1 answer
  • Write an application that determines which, if any, of the following files are stored in the folder where you have saved the exe
    10·1 answer
  • What is data? why is it important to collect data ? explain the points.​
    10·1 answer
  • Three reasons Why we connect speakers to computers
    15·2 answers
  • Individuals and IT professionals have a responsibility to be aware of security threats and the damage they might do.
    7·1 answer
  • Design a loop that asks the user to enter a number. The loop should iterate 10
    15·1 answer
  • Which command os used to find a particular word in a document ?<br>​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!