main()
{
static int a[3][3]={1,2,3,4,5,6,7,8,9};
int i,j;
static *p[]={a,a+1,a+2};
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
printf("%d\t%d\t%d\t%d\n",*(*(p+i)+j),
*(*(j+p)+i),*(*(i+p)+j),*(*(p+j)+i));
}
}
Answer / susie
Answer :
1 1 1 1
2 4 2 4
3 7 3 7
4 2 4 2
5 5 5 5
6 8 6 8
7 3 7 3
8 6 8 6
9 9 9 9
Explanation:
*(*(p+i)+j) is equivalent to p[i][j].
| Is This Answer Correct ? | 11 Yes | 1 No |
write a program to find out roots of quadratic equation "x=-b+-(b^2-4ac0^-1/2/2a"
what will be the output of this program? void main() { int a[]={5,10,15}; int i=0,num; num=a[++i] + ++i +(++i); printf("%d",num); }
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
Is the following statement a declaration/definition. Find what does it mean? int (*x)[10];
how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s; printf("%d",s->x); printf("%s",s->name); }
How to access command-line arguments?
What are the files which are automatically opened when a C file is executed?
main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"