Question: Consider the following program in C: #include #include #define SIZE 6 int main( void ) { } int data[] = { 5, 23, 2,
Consider the following program in C: #include #include #define SIZE 6 int main( void ) { } int data[] = { 5, 23, 2, -4, 7, 12 }; int indexL = 0; int indexR = SIZE = 1; int temp; while( indexL < indexR) { } temp= data[indexL ]; data indexL ]= data[ indexR ]; data [indexR] = temp; indexL++; indexR--; printf( "Process has completed. " ); return 0; What will be the value of the elements of array data when the code above reaches the printf statement? ?
Step by Step Solution
There are 3 Steps involved in it
The C program you presented is designed to reverse the elements of the array data The while loo... View full answer
Get step-by-step solutions from verified subject matter experts
