Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
320 views1 page

Arrays Test

Uploaded by

sai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
320 views1 page

Arrays Test

Uploaded by

sai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

void main()

{
int arr[];
arr[1]=10;
printf("%d" arr[0]);
}// error

//////////////////////////////////
void main()
{
int arr[2]={10,20,30,40};

printf("%d" *(arr+2));
}

//error
////////////////////////////////

void main()
{
int arr[2]={10,20};
arr[2]=30;
arr[3]=40;

printf("%d" *(arr+3));
} //40
//////////////////////////////////////
void main()
{
int arr[2]={10,20};
*arr=30;
*(arr+1)=40;

printf("%d %d" arr[0],1[arr]);


}
////////////////////////////////////////////////////////////
void main()
{
int a[]={7,18,29}
int *p;
p=a;
++p;
printf("%d %d %d ,p[-1],p[0],p[2]);
}
//////////////////////////////////

You might also like