Array manipulated using indexing,poniteR PROGRAM by zuhaibriaz

VIEWS: 2 PAGES: 1

Array manipulated using indexing,ponite

More Info
									#include <iostream.h>
#include <stdlib.h>
#include<conio.h>
main()
{
    int c[5], v[10];
    int multi [5][10];
    int *ptr;
    ptr = *multi;


    for(int i=0; i < 6; i++)
    {
        for (int j=0; j < 10; j++)
        {
                multi[i][j] = i * j;
        }
    }


    cout << "\n Array manipulated using indexing is: \n";
    for(int i=2; i <6; i++)
    {
        for (int j=1; j < 10; j++)
        {
                cout << multi[i][j] << '\t';
        }
        cout << '\n';
    }


    cout << "\n Array manipulated using pointer is: \n";
    for(int k=0; k < 50; k++, ptr ++)
    {
        cout << *ptr << '\t';
    }



getch();
}

								
To top