Transpose of a matrix in c using dynamic memory allocation


Asked by admin @ in Computer Science viewed by 301 People


C program to find transpose of a matrix using dynamic memory allocation

Answered by admin @



Answer:

Program to Find the Transpose of a Matrix

#include <stdio.h>

int a[10][10], transpose[10][10], r, c, i, j;

printf("Enter rows and columns: ");

scanf("%d %d", &r, &c);

// Assigning elements to the matrix.

printf("\nEnter matrix elements:\n");

for (i = 0; i < r; ++i)

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


Similar Questions

Merits and demerits of static and dynamic memory allocation

Asked by admin @ in Science viewed by 315 persons

Advantages and disadvantages of static and dynamic memory allocation

Difference between static memory allocation and dynamic memory allocation

Asked by admin @ in Computer Science viewed by 259 persons

Differentiate between static and dynamic memory allocation

Which one is used during memory deallocation in c

Asked by admin @ in Computer Science viewed by 351 persons

which one is used during memory deallocation in c? a) remove(p); b) delete(p); c) free(p); d) terminate(p)

The main working memory used by the computer is

Asked by admin @ in Computer Science viewed by 379 persons

The main working memory used by the computer are?

Which of the following is used in main memory

Asked by admin @ in English viewed by 340 persons

Which of the following is used in main memory​

The memory implemented using the semiconductor chips is

Asked by admin @ in Computer Science viewed by 329 persons

1) The memory implemented using the semiconductor chips is​

Is the high speed memory used in the computer

Asked by admin @ in Computer Science viewed by 291 persons

______ is the high speed memory used in the computer. A.RAM B.Hard Disk C.Cache D.BIOS

Cache memory is used in a computer system to

Asked by admin @ in Computer Science viewed by 402 persons

7. Cache memory is used in a computer system to___​

Which of the following occupies more memory in c

Asked by admin @ in Computer Science viewed by 8154 persons

Which data type occupies most amount of memory in c?

What characteristic of read only memory makes it useful

Asked by admin @ in Computer Science viewed by 366 persons

What characteristic of read-only memory (ROM) makes it useful ? (1) ROM information can be easily updated (2) ROM provides very large amounts of inexpensive data storage (3) Data in …

Which memory trick can be used to expand your vocabulary

Asked by maham237 @ in English viewed by 285 persons

I. prefix II. rhyme III. acronym I only I and II II and III I and III

Which of these makes music association a useful memory technique

Asked by maham237 @ in Computers And Technology viewed by 319 persons

Which computer memory is used for storing programs

Asked by maham237 @ in Computers And Technology viewed by 354 persons

RAM Clear sel 19. Which computer memory is used for storing programs and data currently being processed by the CPU? Mass memory RAM O Neo-volatile memory

The parameter passing mechanism used in c is

Asked by admin @ in Computer Science viewed by 355 persons

The parameter passing mechanism used in C is a) call by name b) call by value c) name call d) None of these

The control conditional statements used in c is are

Asked by admin @ in Computer Science viewed by 316 persons

The control/conditional statements used in c is/are

Most viewed questions in Computer Science


A programmer mistakenly writes gor instead of for

Asked by admin @ in Computer Science viewed by 19039 persons


Domestic data entry operator ncert book class 9 solutions

Asked by admin @ in Computer Science viewed by 15828 persons


Information technology code 402 class 9 solutions chapter 1

Asked by admin @ in Computer Science viewed by 10985 persons



Ncert solutions for class 8 computer chapter 1 computer system

Asked by admin @ in Computer Science viewed by 10416 persons


A scrum team works on a 4 weeks sprint

Asked by admin @ in Computer Science viewed by 8730 persons


Which of the following occupies more memory in c

Asked by admin @ in Computer Science viewed by 8154 persons



A database of motor vehicles has the base entity

Asked by admin @ in Computer Science viewed by 7853 persons


The network architecture can be termed as a mcq

Asked by admin @ in Computer Science viewed by 6501 persons


Cat5 and cat6 cabling refer to which reference model layer

Asked by admin @ in Computer Science viewed by 5804 persons



Class 7 computer chapter 3 questions and answers

Asked by admin @ in Computer Science viewed by 5706 persons


Choose the correct options about usability and user experience

Asked by admin @ in Computer Science viewed by 5487 persons


Which advocates daily team meetings for coordination and integration

Asked by admin @ in Computer Science viewed by 4994 persons



Which three security features match the database security level

Asked by admin @ in Computer Science viewed by 4985 persons


Which of the dbms package is not available

Asked by admin @ in Computer Science viewed by 4698 persons


________ aid a business grow and attain its objectives

Asked by admin @ in Computer Science viewed by 4499 persons