0
C exam question
int main() { int i, j, val=1, s=0; int arr[4][4], brr[4][4]; for (i=0; i<4; i++) for (j=0; j<4; j++, val++) { arr[i][j] = val; brr[j][i] = val; } for (i=0; i<3; i++) for (j=0; j<4; j++) s += arr[i][j]âbrr[i][j]; printf("%d", s); return 0;} ı cant execute this code. Do you see any problem in this code?
8 Respostas
+ 1
Dude, did you included std liberies in ur code??
+ 1
#include <stdio.h>
#include <condo.h>
int main() {
+ 1
yes
+ 1
There's is mistake in intedention in ur program ..
After first for loop use {
Coz u r using nests for loop here.
0
what is intedention and ı dont understand where ı should use {}
0
for (i=0; i<4; i++)
{
for (j=0; j<4; j++,val++)
{
0
Same for another proceeding loops
0
ıt doesnt work