C Programming and Technical Programming Arrays

main()
{
int a[3][4]={(5,7,5,9),(4,6,3,1),(2,9,0,6)};
int *p;
int (*q)[4];
p=(int *)a;
q=a;
printf("n%u%u",p,q);
p++;
q++;
printf("n%u%u",p,q);
}

Read Solution (Total 1)

C Other Question

Consider the following code:

for i= m to n increment 2
{ print "Hello!" }

Assuming m < n and exactly one of (m,n) is even, how many times will Hello be printed?
Option 1 : (n - m + 1)/2
Option 2 : 1 + (n - m)/2
Option 3 : 1 + (n - m)/2 if m is even, (n - m + 1)/2 if m is odd
Option 4 : (n - m + 1)/2 if m is even, 1 + (n - m)/2 if m is odd
4 4 4 4 4 4 4
4 3 3 3 3 3 4
4 3 2 2 2 3 4
4 3 2 1 2 3 4
4 3 2 2 2 3 4
4 3 3 3 3 3 4
4 4 4 4 4 4 4