daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. #define ROWS 3
  5. #define COLS 5
  6.  
  7. int sum( int **A ) {
  8.   return 0 ;
  9. }
  10.  
  11. int main() {
  12.   int i, j ;
  13.   int A[ROWS][COLS] ;
  14.   for ( i = 0; i < ROWS; i++ ) { for ( j = 0; j < COLS; j++ ) A[i][j] = rand() ; }
  15.   for ( i = 0; i < ROWS; i++ ) { for ( j = 0; j < COLS; j++ ) printf( "A[%d][%d] == %d\n", i, j, A[i][j] ) ; }
  16.   sum( A ) ;
  17.   return 0 ;
  18. }
  19.  
  20. 2d.c: In function `main':
  21. 2d.c:32: warning: passing arg 1 of `sum' from incompatible pointer type
RAW Paste Data
Top