Answers for "array in c language"

C
1

c program for array

// Array declaration by specifying size 
int arr1[10]; 
  
// With recent C/C++ versions, we can also 
// declare an array of user specified size 
int n = 10; 
int arr2[n];
Posted by: Guest on March-02-2021
0

Arrays in C

#include <stdio.h>
void display(int age1, int age2)
{
    printf("%dn", age1);
    printf("%dn", age2);
}

int main()
{
    int ageArray[] = {2, 8, 4, 12};

    // Passing second and third elements to display()
    display(ageArray[1], ageArray[2]); 
    return 0;
}
Posted by: Guest on January-05-2021

Code answers related to "C"

Browse Popular Code Answers by Language