Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- int marks[100][100];
- int i,j,r,c;
- printf("Enter row and column number for a 2D array: \n");
- scanf("%d %d", &r, &c);
- for (i=0; i<r; i++){
- for (j=0; j<c; j++){
- printf("Enter Value at Marks[%d][%d] : ", i,j);
- scanf("%d", &marks[i][j]);
- }
- }
- printf("\n 2D Values are: \n\n");
- for (i=0; i<r; i++){
- for (j=0; j<c; j++){
- printf("%d\t", marks[i][j]);
- }
- printf("\n");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment