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
Ou have just set up a network that will use the tcp/ip protocol, and you want client computers to obtain ip configuration automa
Aleks [24]
DHCP (Dynamic Host Configuration Protocol)
5 0
3 years ago
Styles are modified by using the Office clipboard in the Home tab. true or false
cluponka [151]
Your answer is false
7 0
3 years ago
Read 2 more answers
PLZZZZ I NEED THE ANSWER NOW PLZZZZ!!!!!!!!!!!!!!!!!!!!!!!!! Which one of the following is considered a peripheral? A Software B
kaheart [24]

D is the answer  motherboard is correct

3 0
3 years ago
True or false? a router is a network device that directs packets over a network towards their final destination.
Alex_Xolod [135]

A router is a web device that directs packages over a web towards their final destination is true.

<h3>What is the router?</h3>
  • A router is a machine that combines two or more packet-switched grids or subnetworks.
  • A router accepts and data transmits  on computer networks. Routers are sometimes confused with network hubs, modems, or network controllers.
  • However, routers can integrate the functions of these components, and secure with these devices, to improve Internet entry or help create interaction networks.
  • A router is a device that is used for forwarding the internet connection to all the related devices.
  • A Wi-Fi connects the networking parts of a router and a wireless access point.
  • A wireless router (or Wi-Fi router) works much like a wired router, but it returns wires with wireless radio calls.

To learn more about router, refer to:

brainly.com/question/24812743

#SPJ4

7 0
1 year ago
Unscramble thr words <br>1.Nsieg Wiev<br>2.Seeathdat ievw​
valentinak56 [21]

Answer: genis view       headset view

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • It's better to create tables just by starting typing in the data that you want the table to store. There is no need to name fiel
    6·1 answer
  • In 1970, the federal government created __________ to both assist and require employers and employees to make the prevention of
    14·1 answer
  • Which of the following works on the pay-per-click (PPC) and cost-per-click (CPC) concept? ~ Plato
    9·1 answer
  • You can count on everything online to be 100% accurate. <br> A. FALSE <br> B. TRUE
    11·2 answers
  • How does it transform your ways of socializing
    11·1 answer
  • The first cell phones in widespread use were . Smartphone technological advancements added services. Answer the following questi
    12·2 answers
  • Given the following statement, what is the value of myExample?
    13·1 answer
  • Activity 1.1.4 What is Technology?
    10·1 answer
  • How to set Campaign goals?
    11·1 answer
  • Which statement refers to a computer software
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!