About 3,850,000 results
Open links in new tab
  1. Program to print the Diagonals of a Matrix - GeeksforGeeks

    Oct 9, 2023 · Given a 2D square matrix, print the Principal and Secondary diagonals. For example, consider the following 4 X 4 input matrix. The primary diagonal is formed by the …

  2. Write a C Program to print diagonal elements of a Matrix

    Nov 18, 2016 · To declare a two-dimensional integer array of size [x] [y], you would write something as follows −. Where type can be any valid C data type and arrayName will be a …

  3. How do you traverse a 2D array diagonal in C? - Stack Overflow

    Aug 9, 2010 · Creating a function where parameters are : the array, no of rows and no of columns. Thus we may recieve a diagonally persent values. Diagonally present values are those where …

  4. C language Two Dimensional (Matrix) solved programs/examples

    Syntax to declare a two-dimensional array in C, This section contains solved C programs on two-dimensional arrays, practice these programs to learn the concept of array of arrays or two …

  5. Two dimensional (2D) arrays in C programming with example

    Jul 25, 2022 · The two dimensional (2D) array in C programming is also known as matrix. A matrix can be represented as a table of rows and columns. Let's take a look at the following C …

  6. Printing a 2-D array diagonally - Code Review Stack Exchange

    We can move the printing of the main diagonal to the first loop, so that its condition is row < N and remove it from the second loop by starting col at 1. Also observe that temp_row and temp_col …

  7. C Multidimensional Arrays (Two-dimensional and more) - W3Schools

    To create a 2D array of integers, take a look at the following example: int matrix[2][3] = { {1, 4, 2}, {3, 6, 8} }; The first dimension represents the number of rows [2] , while the second dimension …

  8. Program to print Lower triangular and Upper triangular matrix

    Feb 16, 2023 · Given a two dimensional array, Write a program to print lower triangular matrix and upper triangular matrix. Lower triangular matrix is a matrix which contains elements below …

  9. Two Dimensional Array in C - Tutorial Gateway

    Two Dimensional Array in C is the simplest form of MultiDimensional. In Two Dimensional Array, data is stored in rows and column-wise. We can access the record using both the row index …

  10. c - check 2d array diagonally? - Stack Overflow

    May 23, 2017 · To achieve your goal you'd simply need to decrement X iterator & Y iterator when going through your array. Here is a simple example: int arr[3][3]; int it_y; int it_x; it_y = 0; it_x = …

  11. Some results have been removed
Refresh