I'm having trouble with recursion!
If I have an array as: int a[] = {1, 2, 3, 4, 5};
and I want to display it on the screen like this:
1 2 3 4 5
I have to write : void PrintData(int a[], int n) to do that and using recursion!
How can I do that!
Please help me and thanks a lot!
lagvino_els 0 Newbie Poster
Unimportant 18 Junior Poster
lagvino_els 0 Newbie Poster
Unimportant 18 Junior Poster
lagvino_els 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.