#include<stdio.h>
#include<conio.h>
int main()
{
int a[4][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);
getch();
return 0;
}

what is the meaning of this program?

Answer Posted / sanjay bhosale

Assuming base address is 1000.
And integer requires 4byte of memory.

First printf will give 1000 and 1000
while second printf will give 1004 and 1016.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I need a sort of an approximate strcmp routine?

653


If I have a char * variable pointing to the name of a function ..

644


Write a code to generate a series where the next element is the sum of last k terms.

726


Differentiate between a for loop and a while loop? What are it uses?

663


Can you subtract pointers from each other? Why would you?

554






The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

669


What are directives in c?

538


What are c identifiers?

621


Why can’t constant values be used to define an array’s initial size?

824


What is difference between Structure and Unions?

632


Explain what is meant by 'bit masking'?

638


Explain that why C is procedural?

650


What are the 4 types of unions?

601


difference between native and cross compilers

1665


Linked lists -- can you tell me how to check whether a linked list is circular?

634