Two dimension array- c program, C/C++ Programming

Assignment Help:

2-D Array- C program:

Define a two dimension array using c.

void convert ( int a[10][10] , int[] , int , int);

void main()

  {

  clrscr();

  int a[10][10], b[100], n, m, i, j;

  cout<<"enter the number of rows of the array : ";

  cin>>n;

  cout<<"enter the number of columns of the array : ";

  cin>>m;

  for (i=0;i

                {

                for(j=0;j

                                {

                                cout<<"enter element "<

                                cin>>a[i][j];

                                }

                }

  convert (a,b,n,m);

  cout<

  cout<<"the converted array is :"<

  for(i=0;i<(m*n);i++)

                {

                cout<

                }

  getch();

  }

  void convert (int a[10][10] , int b[100] , int n , int m)

                {

  int i,j,k=0;

  for(i=0;i

                {

                for(j=0;j

                                {

                                b[k]=a[i][j];

                                k++;

                                }

                }

  }


Related Discussions:- Two dimension array- c program

Define array of objects, Array of Objects A class is a template, which ...

Array of Objects A class is a template, which can contain data items as well as member functions to operate on the data items. Various objects of the class can also be declared

Described the isa and hasa class relationships. , Described the ISA and HAS...

Described the ISA and HASA class relationships. How would you apply each in a class design? A: A specialized class "is" specialization of another class and, thus, has the ISA re

Prepare an ipad application clash of clans like game, Prepare an iPad appli...

Prepare an iPad application Clash of Clans like game I would like to prepare a free city building app with the in app purchase possibility. An example game could be Clash of Cla

What is the employ of ''using'' declaration?, A: A using declaration makes ...

A: A using declaration makes it possible to employ a name from a namespace without the scope operator.

What is a template in c++, Templates permit to create generic functions tha...

Templates permit to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until

Loops, how many types of loops are there and whay are they and what are its...

how many types of loops are there and whay are they and what are its uses

Command-line arguments, Command-line arguments are passed into programs usi...

Command-line arguments are passed into programs using the arguments of main(). Here's a quick example, for a program called by typing "progname file.txt 1 2.7": #include #incl

Palindrome, A palindrome is a string that reads the same from both the ends...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Define enumeration in computer programming, Define Enumeration in Computer ...

Define Enumeration in Computer Programming? Enumerated types enclose a list of constants that are able to be addressed in integer values. We can declare variables and types

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd