Week12 - b write a complete a program week12_1.c that...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
ENEE 140: Introduction to Programming Concepts for Engineers [email protected] © Gang Qu Spring 2010 Week 12 Lab report: Write program to answer the questions 1.b, 1.c, and 2, and name them week12_1.c and week12_2.c. Submit by the following command: submit 2010 spring enee 140 010? 1 week12_1.c submit 2010 spring enee 140 010? 1 week12_2.c Due: 11:59 pm Monday, May 3. Lab 21: Monday April 26 TA will cover problem 1.a; then explain what you are supposed to do in 1.b and give you 15-20 minutes to work on it; then walk through code week12_2.c for problem 2 with you. If there is time, you can work on problem 2. Remember: quiz on Wednesday. 1. two-dimensional array: considering the following array or matrix int A[][4]={{0,1},{0},{1,-2,3,-5},{3,2,1},{-1,-1,0,-1},{0}}; a how many rows A has? How many columns A has? write down in a tabular way all the elements in A.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b write a complete a program week12_1.c that computes the sum of each column of the above matrix. Declare the variables that you will need. c Think about whether you can compute and store the sum of each row. Write your thoughts as comments in the beginning of file week12_1.c . 2. Read in a matrix: in class on April 23, we discussed 5 different ways to fill in the matrix with a list of integer. The code week12_2.c posted on the GLUE class public directory implements method the first and the last one. Read that code for the input format the five methods. Complete that program by implementing the other 3 methods. The test data is provided in the same directory under file name week12_2.data . Lab 22: Wednesday April 28 3. Quiz 3: on one dimensional array. Lecture 11 Outline: 1. more on function 2. scope of variables 3. project 3 questions and answers...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online