lab8b.c - #include void type that does not return...

Info icon This preview shows pages 1–3. Sign up to view the full content.

#include <stdio.h> // void type that does not return a values /** * print the array values * * @param arr[] * The address of the first element of an array of characters containing * the string. * * @param size * The size of the array * */ void printArrayValues(int arr[], int size) { int i;// Declaration for(i=0; i<size; i++)// Loop { printf("%i ", arr[i] );// Output } printf("\n");// Output } // void type that does not return a values /** * print * * @param arr[] * The address of the first element of an array of characters containing * the string.
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

* * @param size * The sze of the array * */ void fillWithIndex(int arr[], int size)
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { int i;// Declara±on for(i=0; i<size; i++)// Loop { arr[i]=i;//Assigning a value to an array } } int main(int argc, char * argv) { int arr1 = { 23, 21, 20, 27 }; int arr2 = { 5, 7, 9, 11, 13 }; // Print the value in the Frst array, Fll that array with // its indexes, and then print the values of the array // again. printArrayValues(arr1,4); FllWithIndex(arr1,4); printArrayValues(arr1,4); // Do similarly for the second array. printArrayValues(arr2,5); FllWithIndex(arr2,5); printArrayValues(arr2,5); return 0; }...
View Full Document

  • Spring '15
  • DavidAdams
  • Array, Return statement, Void type, Type theory

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern