+ 2
What this is program is showing error can any one help me
https://sololearn.com/compiler-playground/cIG3wF98Ap26/?ref=app
6 odpowiedzi
+ 3
https://sololearn.com/compiler-playground/c2t1d61690QP/?ref=app
+ 6
#include <stdio.h>
int main() {
int i,j,a[3][3]={{10,11,12},
{20,21,22},
{30,31,32}};
for(i=0;i<=2;i++)
{
printf("the address of array=%p ",*(a+i));
for(j=0;j<=2;j++)
{
printf("the value of array=%d\n",*(*(a+i)+j));
}
}
return 0;
}
+ 2
Viraj Yadav ,
Your code would be easier to read if you indented better. Notice how 卂ㄚㄩ丂卄 improved it.
Here's a good reference.
https://www2.cs.arizona.edu/~mccann/indent_c.html
+ 1
Viraj Yadav ,
Please add a C tag.
+ 1
#include <stdio.h>
int main() {
int i,j,a[3][3]={{10,11,12},
{20,21,22},
{30,31,32}};
for(i=0;i<=2;i++)
{
printf("the address of array=%p ",*(a+i));
for(j=0;j<=2;j++)
{
printf("the value of array=%d\n",*(*(a+i)+j));
}
}
return 0;
}
+ 1
Oh thanks