Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
151 views
in Technique[技术] by (71.8m points)

How to define multiple dynamic arrays in C form input?

I'm trying to code a problem in C language which I think it needs to define multiple dynamic arrays based on what we get from user's input. It would be my pleasure to hear your kind answers if there is a solution on this situation or not?

In first line of the input we get n from user. Then in the next n lines we get the size and also the elements of n arrays. for instance, in first line of n we get these numbers: 3 4 5 3. This means our first array should be with size three and the elements are 4,5,3 respectively. In the other lines this story goes by and at the end we should print all the n arrays. Note that this story was just a section of a bigger problem. I know there are much other ways to print these data but I need to implement exactly based on what mentioned.

Best regards

question from:https://stackoverflow.com/questions/66066705/how-to-define-multiple-dynamic-arrays-in-c-form-input

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...