C Program : to print Spiral matrix.

Apr 15th, 2015
Studypool Tutor
Price: $15 USD

Tutor description

Write a program that will print spiral matrix by asking the matrix order and elements.

Word Count: 353
Showing Page: 1/2
#include#includevoid creat2d(int ***twoDarr,int *order);void getElements(int **twoDarr,int order);void display2d(int **arr2d,int n);void showSpiral(int **p,int n);int main(){int **twoDarr,n;/* allocate memory for 2-D array * this will give the order and the initial addr of 2D array*/creat2d(&twoDarr,&n);/*scan the elements to the 2D-array */getElements(twoDarr,n);/*display the elements */display2d(twoDarr,n);/*display the elements in spiral order */printf("\nIn spiral

Review from student

Studypool Student
" excellent work as always thanks for the help "
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1826 tutors are online

Other Documents

04/15/2015
04/15/2015
04/15/2015
04/15/2015
04/15/2015
04/15/2015
04/15/2015
04/15/2015
04/15/2015
04/15/2015

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors