To take input for n number of arrays and print it.
-
in the below code it prints for arr[0] and not after it. please tell to correct.
#include int i, j;
int arr[100][100];void array(int arr[i][j], int size[i+1])
{for(j=0; j
I cannot figure out what you are trying to do but most of what you have makes no sense at all. Statements such as:
void array(int arr[i][j], int size[i+1]) // what are all these indices supposed to mean?
scanf("%d", &arr[i][j]);
printf("arr[%d][%d]\n", i, j); // what are you trying to print? -
I cannot figure out what you are trying to do but most of what you have makes no sense at all. Statements such as:
void array(int arr[i][j], int size[i+1]) // what are all these indices supposed to mean?
scanf("%d", &arr[i][j]);
printf("arr[%d][%d]\n", i, j); // what are you trying to print? -
the user will input n number of arrays of different array sizes, and then the program will print every array that user has entered. I want to create a program that will merge n number of arrays.
To create the arrays you need to get the size of each dimension and then create the array dynamically. You cannot pre-allocate them if you do not have their size. Once you have all the requested arrays then you need to create another one that will contain the results of your merge.
-
To create the arrays you need to get the size of each dimension and then create the array dynamically. You cannot pre-allocate them if you do not have their size. Once you have all the requested arrays then you need to create another one that will contain the results of your merge.
-
if you run the code it will take the size of array first and then fill in the respective elements in according to the size entered. But i am not able to print it on the screen. Please run it and tell me what's wrong.
-
Like I already told you, much of that code makes no sense, so there is no point in me trying to run it. You need to sort out the logic first.
-
in the below code it prints for arr[0] and not after it. please tell to correct.
#include int i, j;
int arr[100][100];void array(int arr[i][j], int size[i+1])
{for(j=0; j
#include
void array(int arr[], int i, int size)
{
for (int j = 0; j -
#include
void array(int arr[], int i, int size)
{
for (int j = 0; j -
#include
void array(int arr[], int i, int size)
{
for (int j = 0; jin the code below i have tried using recursion for printing output, but it's not working can you tell me what's wrong.
#include int final_array(int arr[], int size, int k, int i);
void array(int arr[], int i, int size);int main()
{
int num, size[100];
int i, j, k=0;
int arr[100][100];printf("Enter the number of arrays: \\t"); scanf("%d", &num); num = num < 100 ? num: 100; //feeding elements. for (i = 0; i