// ******************************************************************** // Author: Zhixiang Chen // Class: CSCI/CMPE 1170, Spring 2009 // Lab Optional 3: Array parametrs to functions // Date: January 17, 2009 // Revised on: 06/30/2009 by SIRISHA SURISETTY // Comment: The code here is meant to be revised. // //--------------------------------------------------------------------- // // This lab exercise is to show how array parameters to functions work. // // Compile and run your program. When everything is fine, // print your .cpp and .h files and turn them to me or the TA. // ********************************************************************* #include #include #include #include #include #include #include #include "optional_lab_3_head.h" using namespace std; int main( ) { //define a const array size const int SIZE = 10; //array declaration int numbers[SIZE]; //an int array char charsOne[SIZE], charsTwo[SIZE], //two char arrays ch; int i; //loop var //initialize numbers for (i=0; i "; cin>>charsOne; //here, we treat chars as a C-string //so that we can use cin to the charsOne cout<<"charOne is " <