Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

create a recursive program that will accept value set and of an array with the range of 5.

+2 votes
asked Aug 29, 2019 by agik ik

1 Answer

0 votes
answered Nov 14, 2025 by Aryan verma (140 points)
#include <stdio.h>

void read(int a[], int i) {
    if (i == 5) return;
    scanf("%d", &a[i]);
    read(a, i + 1);
}

int main() {
    int a[5];
    printf("Enter 5 values:\n");
    read(a, 0);
    return 0;
}
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...