Skip to main content

Thread: pointers and arrays in C


i need pointers , arrays in c. i'm trying make function follows

code:
 void matrix_new(int **matrices, int *rows, int *cols){  //function enter arrays   20    21    *rows = &matrices[0][1];  //this check number of rows   22    *cols = &matrices[0][2];  //this check number or columns   23    int i, j;   24        26    for(i = 0; < *rows; i++){   27       for(j = 0; j < *cols; j++){   28         if(i==0 && j==0){   29            scanf("%c", matrices[i][j]);   30           }   31         if(i==0 && j==1){   32            scanf("%c", matrices[i][j]);   33           }   34         for(i=4; i<*rows; i++){   35           scanf("%d", matrices[i][j]);   36         /*now what*/   37            38        }   39      }
after start scanning items want check if user enters character using isalpha() function. if user enters character want scanf() element character type , keep entering elements integers. can me this?

thread moved programming talk.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk pointers and arrays in C


Ubuntu

Comments

Popular posts from this blog

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support