California State University, Northridge
|[pic] |College of Engineering and Computer Science |
| |Computer Science Department |
| |Computer Science 106 |
| |Computing in Engineering and Science |
| |Spring 2006 Class number: 11672 Instructor: Larry Caretto |
Homework Solutions – May 9, 2006
Page 434, Checkpoint 7.17 – What is the output of the following program? (You may need to consult the ASCII table in Appendix A.).
#include
using namespace std;
// function prototype
void fillArray( char[], int);
void showArray( char[], int);
int main()
{
char prodCode[8] = { ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’, ‘0’ };
fillArray( prodCode, 8 );
showArray( prodCode, 8 );
return 0;
}
// Definition of function fillArray
// (Hint: 65 is the ASCII code for ‘A’.)
void fillArray( char arr[], int size)
{
char code = 65;
for ( int k = 0; k < size; k++ )
arr[k] = code;
}
// Definition of function fillArray
void showArray( char codes[], int size)
{
for ( int k = 0; k < size; k++ )
cout ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- california state university system
- california state university second bachelor s
- california state university tuition
- california state university jobs
- california state university system schools
- california state university system wiki
- california state university application log in
- california state university campuses list
- california state university log in
- california state university application deadline
- california state university tuition fee
- california state university fees