Final answer:
The question involves writing a C program with two functions, Input() and Print(), to collect an array of integers and print elements at odd indices, respectively. A sample code is provided.
Step-by-step explanation:
The student is asking for a C program that includes two user-defined functions: Input() and Print(). The main function calls Input(), which takes an array of 6 integers from the user. The array is then passed to Print(), where all the elements at odd indices are printed.
Example C Program
Here is an example of how this can be done:
#include
void Input(int arr[]);
void Print(int arr[]);
int main() {
int array[6];
Input(array);
Print(array);
return 0;
}
void Input(int arr[]) {
for (int i = 0; i < 6; i++) {
scanf("%d", &arr[i]);
}
}
void Print(int arr[]) {
for (int i = 1; i < 6; i += 2) {
printf("%d ", arr[i]);
}
printf("\\");
}
In this program, the Input() function collects 6 integers from the user and stores them in an array. The Print() function then iterates through the array, printing the elements located at odd indices.