subject

Take the 2D array of integers 'matrix' and print the tranpose matrix. // You may assume that row and column counts are equal.
// **Hint: Use printMatrix to print the result**
// e. g.
// 1 2 3 1 4 7
// 4 5 6 2 5 8
// 7 8 9 369
void transposeMatrix(int matrix[NUM_ROWS] [NUM_COLUMNS])
{
int matrix2[NUM_ROWS][NUM_COLUMNS];
// Enter code below =>
}
// Problem 6: multiplyMatrix
// Take two 2D arrays of integers 'matrixl' and 'matrix2' and print the
// resulting matrix gained by multiplying the entries in each corresponding location.
// You can assume the two matrices will have the same dimensions.
// **Hint: Use printMatrix to print the result**
// e. g.
// 1 2 3 1 2 3 1 49
// 4 5 6 4 5 6 => 16 25 36
// 7 8 9 49 64 81
void multiplyMatrix(int matrix1[NUM_ROWS] [NUM_COLUMNS], int matrix2[NUM_ROWS] [NUM_COLUMNS])
{
int matrixResult[NUM_ROWS][NUM_COLUMNS) ;
// Enter code below
}
splitAndPrintWords (5 points) // Split s[] into individual words and store them in str[][].
// Read s[] character by character and copy into str[][], such that word 1 is in str[0][],
// word 2 is in str[1][], and so on. Print the char array str[][], so that the separated words are
// printed on their own line. Finally return the number of words using the variable 'count'.
// Don't forget to initialize str[[] with the null terminator character '\0'.
// Hint: Words are separated by whitespace characters // e. g.
// "The quick brown fox jumped over the lazy dog"
// The
// quick
// brown
// fox
// jumped
// over
// the
// lazy
// dog
int splitAndPrintWords (char s[NUM_STRINGS STRING_LENGTH])
{
char str[NUM_STRINGS][STRING_LENGTH); int count = 0;
// enter code below return count;
}
// Remove all occurrences of the specified character 'filter' from s[].
// Use the resulting array as input to splitAndPrintWords.
// *** NOTE: If you were unable to code for splitAndPrintWords(), then skip this step and just filter out the char. You will earn partial points for that case.
void filterChar(char s[NUM_STRINGS * STRING_LENGTH), char filter)
{
}
int main()
{
printf("CSE240 HW3: 2D Integer Arrays\n\n");
int matrix[NUM_ROWS] [NUM_COLUMNS] =
{
{1, 2, 3, 4, 5),
{6, 7, 8, 9, 103,
{11, 12, 13, 14, 15),
{16, 17, 18, 19, 20},
{21, 22, 23, 24, 25}
};
printMatrix(matrix);
printf("\n\n");
printMatrixDiagonal(matrix);
printf("\n\n");
sumMatrixRows(matrix);
printf("\n\n");
rotateMatrixRows(matrix, 1);
printf("\n\n"); transposeMatrix(matrix);
printf("\n\n"); multiplyMatrix(matrix, matrix);
printf("\nCSE240 HW3: 2D Character Arrays\n\n");
char words[NUM_STRINGS*STRING_LENGTH);
int i = getchar();
printf("\nEnter words (max 5): ");
fgets(words, sizeof(words), stdin);
int count = splitAndPrintWords (words);
printf("\nNumber of words= %d \n", count);
filterChar(words, 'a');
i = getchar();
i = getchar();
// Keep console open
return ;
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:50
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
question
Computers and Technology, 23.06.2019 10:20
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Write a program in plp assembly that counts up by one starting from zero (or one) inside a loop and writes this value to the leds every time the value is increased. the memory address of the leds is 0xf0200000. the table below shows the meaning and an example usage of the instructions covered in the video, plp instructions for project 1. instruction example usage meaning load immediate li $t0, 8 register $t0 is set to the value, 8. store word sw $t2, 0($t1) the value in register $t1 is used as the memory address. the value in register $t2 is copied into this memory address. add addiu $t4, $t3, 29 register $t4 is assigned the sum of 29 and the value in register $t3. jump j your_label_name the program jumps to the line following the label, "your_label_name: ". label your label name: defines a label called "your_label_name: " that can be jumped to
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
To move an excel worksheet tab, simply right-click on it drag and drop it double-click on it delete it
Answers: 1
You know the right answer?
Take the 2D array of integers 'matrix' and print the tranpose matrix. // You may assume that row an...
Questions
Questions on the website: 13722360