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
Sav [38]
3 years ago
9

Can you answer this question?

Computers and Technology
1 answer:
patriot [66]3 years ago
3 0

Answer:

To do this you'll need to use malloc to assign memory to the pointers used.  You'll also need to use free to unassign that memory at the end of the program using the free.  Both of these are in stdlib.h.

#include <stdlib.h>

#include <stdio.h>

#define SIZE_X 3

#define SIZE_Y 4

int main(void){

       int **matrix, i, j;

       // allocate the memory

       matrix = (int**)malloc(SIZE_X * sizeof(int*));

       for(i = 0; i < SIZE_X; i++){

               matrix[i] = (int *)malloc(SIZE_Y * sizeof(int));

       }

       // assign the values

       for(i = 0; i < SIZE_X; i++){

               for(j = 0; j < SIZE_Y; j++){

                       matrix[i][j] = SIZE_Y * i + j + 1;

               }

       }

       // print it out

       for(i = 0; i < SIZE_X; i++){

               for(j = 0; j < SIZE_X; j++){

                       printf("%d, %d:  %d\n", i, j, matrix[i][j]);

               }

       }

       // free the memory

       for(i = 0; i < SIZE_X; i++){

               free(matrix[i]);

       }

       free(matrix);

       return 0;

}

You might be interested in
How do you send freind requests
AysviL [449]
Can you be specific what do you want to send a friend request on? because just saying how do i send friend request is not specific>
<span><span>
</span></span>
4 0
3 years ago
Read 2 more answers
you have a website that customers use to view product information and place orders. You would like to identify the maximum numbe
notka56 [123]

Answer:

a load tester.

Explanation:

Based on the information provided within the question it can be said that in this situation the tool that you should use is known as a load tester. This tool allows you to test your servers in order to see how it behaves under both normal conditions as well as the anticipated peak load conditions that it may be encountering in the near future. Which is exactly what you need for your website.

4 0
3 years ago
Assume the Student and Employee classes each extend the Person class. The Student class overrides the getMoney method in the Per
SSSSS [86.1K]

Answer:

Person p1, p2, p3;

int m1, m2, m3;

p1 = new Person();

// assignment 1

m1 = p1.getMoney();

p2 = new Student();

// assignment 2

m2 = p2.getMoney();

p3 = new Employee();

// assignment 3

m3 = p3.getMoney();

//////////////////////////////////////////////////////////////////////////////////////////////

The reference to getMoney in assignment 3 is to the <em>Person</em> class.

Explanation:

Since Employee class didn't override Person class's getMoney() method, calling p3 with getMoney() will call Base class's (Person) getMoney() method.

6 0
3 years ago
The process of _____ determines what volume a system can handle by comparing its performance to standards in the industry.
Artyom0805 [142]

Answer:

benchmarking

Explanation:

7 0
3 years ago
Mai has recently created her own e-mail account. Her father gave her permission to e-mail her friends and family but warned her
n200080 [17]

Answer:

I think the last 1 or the 2nd one

Explanation:sorry if im wrong TwT

5 0
3 years ago
Read 2 more answers
Other questions:
  • Stamps offers at-home postage and mailing for a monthly fee. Customers are able to carry a balance on their accounts that allows
    7·1 answer
  • What are the different ways to represent compounds? Check all that apply. a structural formula a ball model a space-filling mode
    13·2 answers
  • Brian drives a car that uses voice commands for navigation. Which field did researchers use to develop a car-based AI that under
    10·1 answer
  • How to change color of object in photoshop?
    10·2 answers
  • Describe what each of the following functions in R do.1. t2. matplot3. c4. seq5. legend6. matrix7. rownames8. colnames9. type of
    14·1 answer
  • Which company provides a crowdsourcing platform for corporate research and development?
    9·1 answer
  • Today you will be researching three forms of technology.
    6·1 answer
  • Some Tiny College staff employees are information technology (IT) personnel.
    8·1 answer
  • Match the feature to its function.
    7·1 answer
  • What is the difference between PowerPoint and Outlook?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!