# Ece 175: computer programming for engineering applications

ECE 175: Computer Programming for Engineering Applications

Homework Assignment 7

Conventions: Name your C programs as hwx py.c where x corresponds to the homework number and y corresponds

to the problem number. As an example the C program for hw1 problem 1 should be named as hw1 p1.c. Write

in at least the following info should be included

– Author:

– Date created:

– Brief (two-line) description of the program:

Submission Instructions: Use the dropbox on D2L to submit only the .c les.

Problem 1: The les in sudoku.zip contain integer values for Sudoku puzzles (two dimensional integer arrays with

9 rows and 9 columns). Write a program that reads a sudoku le as input and prints out if the le is a proper

solution to the Sudoku puzzle.

For the rules of Sudoku, check Wikipedia: http://en.wikipedia.org/wiki/Sudoku.

Example of a correct Sudoku puzzle:

1 2 3 4 5 6 7 8 9

4 5 6 7 8 9 1 2 3

7 8 9 1 2 3 4 5 6

2 3 4 5 6 7 8 9 1

5 6 7 8 9 1 2 3 4

8 9 1 2 3 4 5 6 7

3 4 5 6 7 8 9 1 2

6 7 8 9 1 2 3 4 5

9 1 2 3 4 5 6 7 8

Problem 2: Insertion Sort is a sorting algorithm that moves the elements of an array to their correct position

one element at a time. The following example shows the steps for sorting array data= [3, 7, 4, 9, 5, 2, 6, 1]. In

each step, the item under consideration is underlined. The array before the underlined element is already sorted

while the array after the underline element is unsorted. The item that is moved (or left in place because it was the

biggest yet considered) to the correct position within the sorted part of the array. The new position of the element

that was moved in the previous step, appears in bold in the next step.

3 7 4 9 5 2 6 1

3 7 4 9 5 2 6 1

3 7 4 9 5 2 6 1

3 4 7 9 5 2 6 1

3 4 7 9 5 2 6 1

3 4 5 7 9 2 6 1

2 3 4 5 7 9 6 1

2 3 4 5 6 7 9 1

1 2 3 4 5 6 7 9

1

Develop C code that would implement the Insertion Sort algorithm. Your code should use the following functions

void insertion(int x[ ], int size)

void print ar(int x[ ], int size)

void swap(int *a, int *b)

The last two functions are already provided in the class notes.

Submit your .c les named hw7 p1.c and hw7 p2.c via D2L dropbox

2

Pages (550 words)
Approximate price: -

Why Choose Us

Quality Papers

We value our clients. For this reason, we ensure that each paper is written carefully as per the instructions provided by the client. Our editing team also checks all the papers to ensure that they have been completed as per the expectations.

Over the years, our Acme Homework has managed to secure the most qualified, reliable and experienced team of writers. The company has also ensured continued training and development of the team members to ensure that it keep up with the rising Academic Trends.

Affordable Prices

Our prices are fairly priced in such a way that ensures affordability. Additionally, you can get a free price quotation by clicking on the "Place Order" button.

On-Time delivery

We pay strict attention on deadlines. For this reason, we ensure that all papers are submitted earlier, even before the deadline indicated by the customer. For this reason, the client can go through the work and review everything.

100% Originality

At Essay USA, all papers are plagiarism-free as they are written from scratch. We have taken strict measures to ensure that there is no similarity on all papers and that citations are included as per the standards set.

Our support team is readily available to provide any guidance/help on our platform at any time of the day/night. Feel free to contact us via the Chat window or support email: support@acmehomework.com.

Try it now!

## Calculate the price of your order

We'll send you the first draft for approval by at
Total price:
\$0.00

How it works?

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Our Services

Essay USA has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

## Essay Writing Services

At Essay USA, we prioritize on all aspects that bring about a good grade such as impeccable grammar, proper structure, zero-plagiarism and conformance to guidelines. Our experienced team of writers will help you completed your essays and other assignments.