Code: int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); int A[3][2]={{1,2}, {4,5}, {7,8}}; int B[3][1]= {{0}, {4,}, {7,}}; i want to merge array A and B into a single array C ,which should appear like int C= 0 1 2 4 4 5 7 7 8 please help me with C code to this problem.
There's no single function that'll do this for you. You'll have to define C as int[3][3] then copy the members of A and B over one by one.