sprintf do what you need.

Little example

char str[128];
int i=0;
int index = 0;
for (i=0; i<5; i++)
   index += sprintf(&str[index], "%d", a[i]);

snprintf takes care of the str length

char str[128];
int i=0;
int index = 0;
for (i=0; i<5; i++)
   index += snprintf(&str[index], 128-index, "%d", a[i]);
Answer from LPs on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › c language › how-to-convert-an-integer-to-a-string-in-c
How to Convert an Integer to a String in C? - GeeksforGeeks
July 23, 2025 - itoa() is a non-standard function available in some C compilers like MSVC, etc. It stands for Integer TO ASCII. It converts the given integer value to a null-terminated string and stores the result in the character array( buffer) defined by ...
Discussions

c - Transform an array of integers into a string - Stack Overflow
A function returns an aray of integers and I want it to pass to another function which searches for some pattern. But the second function expects a string. ... Looks like homework. There is no "direct function". You need to write your own. Show us your code so far for some constructive feedback. ... No there isn't, and if there was it probably wouldn't do what you want (which isn't clear). Basically, you can't convert an array ... More on stackoverflow.com
🌐 stackoverflow.com
January 13, 2010
Convert int array to string using C - Stack Overflow
#include #include ... string); } ... Sign up to request clarification or add additional context in comments. ... only comment is that it has a fixed size output buffer but doesnt defend against overruns, clearly works here but since you say you allow for arbitrary size array ... 2022-02-23T21:55:42.863Z+00:00 ... You need to convert the integer into equivalent ... More on stackoverflow.com
🌐 stackoverflow.com
c - Convert integer array into string - Stack Overflow
Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... Save this question. Show activity on this post. ... Copyprintf ("%s", s4); // and output should be => asdfg123%$! ... Save this answer. ... Show activity on this post. Copy the array item by item in a loop and store each value in a char. Then null terminate that char array so that it becomes a string... More on stackoverflow.com
🌐 stackoverflow.com
c - Integer array to string - Code Review Stack Exchange
This function creates takes an int * buffer and creates a neatly formatted string (useful for printing the contents of an array). Is the code easy to follow? Is it efficient? Am I allocating and f... More on codereview.stackexchange.com
🌐 codereview.stackexchange.com
People also ask

Is itoa() function standard for integer to string conversion in C?
No, the itoa() function is non-standard and not available on all compilers, so use sprintf() for better portability.
🌐
wscubetech.com
wscubetech.com › resources › c-programming › programs › int-to-string
How to Convert Int to String in C? 5 Ways With Code
What’s the use case of integer to string conversion in C programming?
Typical use cases include displaying numeric data, formatting output, storing integers as text in files, and user interfaces.
🌐
wscubetech.com
wscubetech.com › resources › c-programming › programs › int-to-string
How to Convert Int to String in C? 5 Ways With Code
How to convert int to string in C easily?
You can easily convert int to string in C using the built-in sprintf() function from or the itoa() function (if supported).
🌐
wscubetech.com
wscubetech.com › resources › c-programming › programs › int-to-string
How to Convert Int to String in C? 5 Ways With Code
🌐
Cprogramming
cboard.cprogramming.com › c-programming › 140549-integer-array-string.html
integer array to string
August 25, 2011 - I have an array of integers (binary[4]) and I want to put the contents into a string i.e binary[0] = 1 binary[1] = 0 binary[2] = 1 binary[3] = 1 and i want a string str = 1011 I thought of doing this · Code: char str[50] //buffer size so never overflow sprintf( str, "%d%d%d%d", binary[0],binary[1],binary[2],binary[3] ); But I dont always know the size of binary and anymore than 4 and i dont want to have to type it in How can I do it in a loop because ·
Find elsewhere
🌐
Coderwall
coderwall.com › p › oea7uq › convert-simple-int-array-to-string-c
Convert simple int array to string C# (Example)
September 29, 2021 - #array · #convert · #c# #string.join · #asp.net · int[] array = {1,2,3,4,5}; string ids = String.Join(",", array.Select(p=>p.ToString()).ToArray()); //output = "1,2,3,4,5"; #.net · #csharp · #array · #convert · #c# #string.join · #asp.net ...
🌐
Techie Delight
techiedelight.com › home › c++ › convert an int array to string in c++
Convert an int array to string in C++ | Techie Delight
July 7, 2026 - This post will discuss how to convert ... as shown below: ... Here, the idea is to push each element of the integer array to the end of the std::string using the string::push_back function....
🌐
WsCube Tech
wscubetech.com › resources › c-programming › programs › int-to-string
How to Convert Int to String in C? 5 Ways With Code
September 17, 2026 - Learn five simple ways to convert an int to a string in C using sprintf(), itoa(), and other methods. Includes code examples!
🌐
TutorialsPoint
tutorialspoint.com › article › chash-program-to-convert-integer-array-to-string-array
C# Program to convert integer array to string array
March 17, 2026 - The Array.ConvertAll() method is the most efficient way to convert an integer array to a string array in C#. It provides excellent performance and requires no additional dependencies.
🌐
Reddit
reddit.com › r/programming › using c, convert a dynamic int array to a comma-separated string as cleanly as possible
r/programming on Reddit: Using C, convert a dynamic int array to a comma-separated string as cleanly as possible
November 16, 2009 - If you want to dynamically allocate the buffer, 1+log10 will tell you about how many chars an integer will need. You could one pass through the array to figure out how much space to allocate for all of them plus your commas, allocate it for your buffer, then make another pass to strncat your sprintf's into the buffer. ... Same idea, but you can take advantage of sprintf to do some of the work for you. #include <stdio.h> #include <string.h> #define LEN 10 int mylist[LEN] = {1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009}; char buffer[2048]; int main() { int i; char * tail = buffer; tail += sprintf(buffer, "%d", mylist[0]); for(i=1; i < LEN; i++) { tail += sprintf(tail, ", %d", mylist[i]); } printf("%s\n", buffer);
🌐
Cprogramming
faq.cprogramming.com › cgi-bin › smartfaq.cgi
Convert an int to a string (char array) (C) - Cprogramming.com
January 28, 2003 - How to begin Get the book · C tutorial C++ tutorial Game programming Graphics programming Algorithms More tutorials
🌐
Edureka Community
edureka.co › home › community › categories › c++ › easiest way to convert int to string in c
Easiest way to convert int to string in C | Edureka Community
May 31, 2022 - What is the simplest way to convert an int to a string in C++? I am aware of two approaches. Is there ... ss; ss
🌐
Quora
quora.com › How-do-I-convert-int-to-string-C
How to convert int to string C - Quora
Answer (1 of 8): There are two methods to convert int to string in c++ 1 Using built in function available in string header file int num = 100; // a variable of int data type string str; // a variable of str data type // using to_string to convert an int into a string str = to_string(num); ...
🌐
Reddit
reddit.com › r/csharp › converting int[,] array to string[,] array?
r/csharp on Reddit: Converting int[,] array to string[,] array?
July 24, 2020 -

This might be better suited for stack overflow but I feel like the question is a bit too short.

I’m trying to convert a multidimensional int array to a string one, I tried using

IntArray.Select(p => p.ToString()).ToArray());

Which I found online but I get an error underlined under the Select part. I am using System.Linq idk if I need anything else or if it doesn’t work for multidimensional arrays or something

Top answer
1 of 3
9
static U[,] Convert(T[,] array, Func func) { var result = new U[array.GetLength(0), array.GetLength(1)]; for (int i = 0; i < array.GetLength(0); i++) for (int j = 0; j < array.GetLength(1); j++) { result[i, j] = func(array[i, j]); } return result; }
2 of 3
4
Multidimensional arrays aren't as friendly as single-dimensional arrays. I highly recommend u/sehraatwork 's answer. It's easy to understand and does what it says. What they left out is an example of calling it, in your case it'd be like: var strings = Convert(IntArray, x => x.ToString()); To do something else, you have to think. You can't just plink down methods you read on StackOverflow and hope they work. If they give you an error message, that error message isn't cryptic God-language, it explains why it won't work. Select() isn't working because it's a projection from one IEnumerable to an IEnumerable. An int[] is IEnumerable because it has a clear "start" and "end". int[,] isn't quite so easy. We can think of several ways to iterate from start to finish, but not all of those ways help us understand which one we're getting. So Select() isn't going to work with it, it wants you to do something more specific. Array.ConvertAll() might work because it's a member of the abstract Array type. It has no choice but to support multidimensional arrays. But again, the error message MUST be read so you understand what's going on. Let's repeat it: "The type arguments cannot be inferred from the usage." "Type arguments" are the T and U or other variables between <> you see in generic types. The C# compiler is pretty good at deducing which type arguments are right, but sometimes it gets confused. When that's the case, we can help it out by providing the arguments. So I'd sort of expect this to work: int[,] items = { { 1, 2 } { 3, 4 } }; string[,] strings = Array.ConvertAll(items, i => i.ToString()); I get the same error message. Hmm. that made me look at the documentation again. The signature for the method is: public static TOutput[] ConvertAll( TInput[] array, Converter converter); The problem's really clear. TInput is the type parameter. The first parameter is TInput[]. We're trying to pass int[,], which would be TInput[,]. There's not a way to express a two-dimensional array as a one-dimensional array, so this method will not work. Sometimes people on the internet don't try the code they post. That means "the long way" is your best way. Just write a method that allocates a new array and copies the items in the order you want. Not everything has a one-line solution. Sometimes the answer to, "How do I..." is "do it yourself." The post I referenced works because it explicitly uses T[,], which means it is compatible with int[,].