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
topjm [15]
3 years ago
8

What is the output from this program? #include void do_something(int *thisp, int that) { int the_other; the_other = 5; that = 2

+ the_other; *thisp = the_other * that; } int main(void) { int first, second; first = 1; second = 2; do_something(&second, first); printf("%4d%4d/n", first, second); return (0); }
Computers and Technology
1 answer:
Ostrovityanka [42]3 years ago
7 0

Answer:

  1  35

Explanation:

* There is a little typo in printf. It should be "\n".

Initially, the value of the first is 1, and the value of the second is 2. Then, do_something(&second, first) is called. The value of the <em>first</em> will still be 1. However, there is a call by reference for <em>second </em>variable. That means the change made by the function <em>do_something</em> will affect the value of the <em>second</em> variable.

When you look at the calculation inside the <em>do_something</em> function, you may see that value of the <em>second</em> will be 35.

You might be interested in
A string is represented as an array of characters. If you need to store an array of 5 strings with the maximum length of a strin
erastova [34]

Answer:

char str[5][100]

Explanation:

See attachment for options:

From the options, we can see that the programming language is C language.

The syntax to store an array of m strings with a maximum of n elements in C is:

char array-name[m][n]

In this case:

m = 5 --- Number of strings in the array

n = 100 --- Maximum character in each string

Assume the array name is str, the syntax can be expressed as:

char str[5][100]

3 0
2 years ago
To find the ____, the net present value of the system is calculated by combining the net present value of the costs of the syste
Diano4ka-milaya [45]

Answer: c) Return on investment (ROI)

Explanation:

Return on investment (ROI)  is defined as term that measures the performance of single investment efficiency or numerous investment plans. It evaluates and assess plan of investment in form of ratio or percentage.

  • Return of investment(ROI) plan is calculated through dividing the return of investment by investment cost.
  • Other options are incorrect because cash return on capital invested ,carried forward(CF) and BI (business intelligence) are not used for calculating the investment plan through cost and benefit.Thus, the correct option is option(c)
8 0
3 years ago
Boosting morale in a workplace through reorientation is accomplished by giving employees _____. a. snacks and drinks b. the same
bixtya [17]
Snacks and Drinks (A)
4 0
3 years ago
Read 2 more answers
Define a function CoordTransform() that transforms the function's first two input parameters xVal and yVal into two output param
Butoxors [25]

Complete Question:

Define a function CoordTransform() that transforms its first two input parameters xVal and yVal into two output parameters xValNew and yValNew. The function returns void.

The transformation is new = (old + 1) * 2. Ex: If xVal = 3 and yVal = 4, then xValNew is 8 and yValNew is 10.

Answer:

The function written in C++ is as follows:

void CoordTransform(int xVal, int yVal) {

   int xValNew = (xVal + 1) * 2;

   int yValNew = (yVal + 1) * 2;

   cout<<"New x: "<<xValNew<<endl;

   cout<<"New y: "<<yValNew;

}

Explanation:

This line defines the function

void CoordTransform(int xVal, int yVal) {

This line declares and calculates xValNew

   int xValNew = (xVal + 1) * 2;

This line declares and calculates yValNew

   int yValNew = (yVal + 1) * 2;

This line prints xValNew

   cout<<"New x: "<<xValNew<<endl;

This line prints yValNew

   cout<<"New y: "<<yValNew;

}

<em>See attachment for complete program that includes the main method</em>

Download cpp
4 0
2 years ago
Your child has broken the RJ-45 port of your laptop by sticking clay into it and there are no wireless networks available in you
sesenic [268]

Answer:

آمل أن يساعد هذا Purchase and use a USB to RJ-45 adapter-yes

fiber_manual_record Enable NIC teaming to increase your bandwidth

Explanation:

67.185.94.80

6 0
2 years ago
Other questions:
  • Select the proper ergonomic keyboarding techniques.
    9·1 answer
  • Several days a week, usually between 8:00 a.m. and 9:00 a.m., users complain of MWI problems. Some have new messages, but their
    11·1 answer
  • Can you give me a long list of anime
    6·2 answers
  • Ile 1 cm<br> ?<br> 50 m<br> The an
    5·2 answers
  • Write a method transpose, that takes as argument a 2D array of integers, myTable, and returns the transpose of myTable. The tran
    11·1 answer
  • True or False? PPOs differ from HMOs because they do not accept capitation risk and enrollees who are willing to pay higher cost
    10·1 answer
  • Which method is used for resolving data dependency conflict by the compiler itself?
    6·1 answer
  • Assume that a file contains students' ids, full names, and their scores (Assignments grade, quizzes grade,
    5·1 answer
  • Data ____ refers to the accuracy of the data in a database
    9·1 answer
  • 100 POINTS
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!