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
Who was making the high-pitched growling noise that Francisco hears?
Gwar [14]

The high-pitched growling noise that Francisco hears is due to mating call of male midshipman fish or 5G.

<h3>What is the  hum about?</h3>

The Hum is known to be a kind of unexplained happenings that has brought a lot of irritations to people. It is known to be a high-pitched noise that brought a lot of scientific theories.

Studies has shown that the high-pitched growling noise that Francisco hears is as a result of  mating call of male midshipman fish or 5G.

Learn more about noise from

brainly.com/question/2278957

8 0
2 years ago
You told your sister about creating bullet points with Word 2013. She calls you and says that she created a list of six bullet p
lapo4ka [179]

Answer:

Tell her to hold the Shift key as she hits Enter.

8 0
3 years ago
Write a program that replaces words in a sentence. The input begins with an integer indicating the number of word replacement pa
kramer

Answer: provided in the explanation segment

Explanation:

This is the code to run the program:

CODE:  

//Input: 3 automobile car manufacturer maker children kids

  //15 The automobile manufacturer recommends car seats for children if the automobile doesn't already have one.

  import java.util.Scanner;

  public class LabProgram{

  public static int findWordInWordList(String[] wordList, String wordToFind, int numInList) {

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

              if (wordList[i].equals(wordToFind)) {

                  return i;

              }

          }

          return -1;

      }

      public static void main(String[] args) {

          Scanner scan = new Scanner(System.in);

          String[] original_String = new String[20];

              String[] modified_String = new String[20];

          int numInList = scan.nextInt();

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

              original_String[i] = scan.next();

              modified_String[i] = scan.next();

          }

          int num_Of_Words = scan.nextInt();

          String[] words_To_Replace = new String[num_Of_Words];

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

              words_To_Replace[i] = scan.next();

          }

          int indx;

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

              indx = findWordInWordList(original_String, words_To_Replace[i], numInList);

              if (indx != -1)

                  words_To_Replace[i] = modified_String[indx];

          }

          for (int i = 0; i < num_Of_Words; i++)

              System.out.print(words_To_Replace[i] + " ");

          System.out.println();

      scan.close();

      }

  }

cheers i hope this helps!!!!1

3 0
3 years ago
Public static void prefixmerge(customer[] list1, customer[] list2, customer[] result {
White raven [17]
I can't get what do you need, but I guess it's a part of java code. I can explain what it means. It's used to unite two rising sorted arrays which are list1 and list2. The result is stored in result array. I suggest you to clearly explain your task as it's difficult to give you correct answer.
8 0
3 years ago
true or false, the random number generator (data analysis tool) requires you to copy paste special value in order to create stat
Vladimir79 [104]

The random number generator (data analysis tool) requires you to copy paste special value in order to create static random value(s) is a false statement.

<h3>What is the meaning of random number?</h3>

A random number is a pick of a number made seemingly at random from a certain distribution such that the distribution is reproduced when a large collection of these numbers is chosen. Such numbers must almost always be independent in order to prevent relationships between succeeding numbers.

Therefore, a hardware or software algorithm known as a random number generator produces numbers at random from a finite or infinite distribution. Pseudo-random number generators and real random number generators are the two primary varieties of random number generators.

Learn more about random number generator from

brainly.com/question/10352102
#SPJ1

8 0
10 months ago
Other questions:
  • To create a digital file from an old photo, I would use a _____.
    10·1 answer
  • You have found statistics on the Internet that you would like to use in your speech.
    6·1 answer
  • Tammy is preparing to give a presentation. she would like to view information that will remind her what to say to her audience b
    10·1 answer
  • Match these items. 1 . Naturalization Act stated that a foreigner had to live in the United States fourteen years to become a ci
    5·1 answer
  • Someone asks you for help with a computer that hangs at odd times. You turn it on and work for about 15 minutes, and then the co
    7·1 answer
  • Get two positive integers from the user. Write code to multiply the two numbers together using only addition or subtraction. You
    12·1 answer
  • How was kapilvastu named​
    11·1 answer
  • WHAT ARE SOME PROS AND CONS OF HYDROGEN FUELL CELLS
    11·1 answer
  • ```{r}
    11·1 answer
  • Self-driving cars are a result of developments in which field of computer<br> science?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!