how to convert an array to an integer code example Example: how to convert array to int int i, k = 0; for (i = 0; i < n; i++) k = 10 * k + a[i];