I was wondering if there is a better way to print an int array in c;
At the moment, I am doing printf("%d" ,.. )for each int in my array.
However, does this cause one system call for int? (if my understanding is correct).
It would be better to convert the int array to a string buffer and then print the buffer in one call.
I can write code for it if necessary.
Q1. is it a good idea or too much trouble to be worth it?
Q2. Are there libraries that implement such a thing. (No matter what google I get back to beginner's tutorials for printing integers: s)
Edit The
size of the array is unknown before.
source
share