Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve using C programming 1. Write a program in C that will find the largest number from a 4X4 matrix and divide each element

Please solve using C programming 1. Write a program in C that will find the largest number from a 4X4 matrix and divide each element of the odd columns of that matrix by that largest number and store in a new matrix then print the matrix. Take inputs from user. Use the following prototype:void normalizeMatrix(int rowSize, int colSize, float mat[rowSize][colSize])void printMatrix(int rowSize, int colSize, float mat[rowSize][colSize]) 2.Write a program in C that will divide each element of an array by the maximum odd number in that array and store the numbers to the new array and print the new array in main. Array size is 10 and takes inputs from the user.Prototype:void newArray(int *inputArr, int *outputArr, int size) 3.Implement the following function which compares two strings without using the library function. Prototype: int compare(char *str1, char *str2). The compare function returns 0 if str1 is equal to str2, returns 1 if str1 is greater than str2, and returns -1 if str2 is greater than str1. Then print the information in the main function. 4. Write a program to add two complex numbers using structure. Create a structure called Complex with two components, real and imaginary. Declare 3 complex type variables and take input from the user. Then add the output addition result of the first 2 complex variable with the 3rd variable and print the final result. Use the function that takes two structure variables as input, then sum up the two complex numbers and return the complex number to the main. Prototype Complex addComplexNumber(Complex a, Complex b).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions