Computers and Technology, 11.02.2021 22:10 noodleboy0923
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 ;
}
Answers: 3
Computers and Technology, 22.06.2019 00:40
If you arrive at the same time as another user straight across from you yield if a. they flash your headlights at you b. you can’t see their turn signals c. you’re going street and they’re running d. you’re turning they’re going straight plz
Answers: 1
Computers and Technology, 23.06.2019 01:10
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
Computers and Technology, 24.06.2019 04:30
Which of the following terms refers to a collection of different types of software that share the goal of infiltrating a computer and making it do something? a- malware b- virus c- spyware d- trojan horse
Answers: 2
Take the 2D array of integers 'matrix' and print the tranpose matrix.
// You may assume that row an...
Biology, 05.07.2019 17:00
English, 05.07.2019 17:00
English, 05.07.2019 17:00
Social Studies, 05.07.2019 17:00
English, 05.07.2019 17:00
Physics, 05.07.2019 17:00
History, 05.07.2019 17:00
Computers and Technology, 05.07.2019 17:00
Mathematics, 05.07.2019 17:00
Mathematics, 05.07.2019 17:00
Mathematics, 05.07.2019 17:00