Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

given the piece of code
int a[50];
int *pa;
pa=a;
to access the 6th element of the array which of the
following is incorrect?
a.*(a+5)
b.a[5]
c.pa[5]
d.*(*pa + 5)

Answer Posted / karthik

void main()
{
int a[50]={1,2,3,4,1,55};
int *pa;
pa=a
printf("%d",*(pa+5));
}

we will the sixth element

its not pointer to the pointer ie *(*pa+5);

Is This Answer Correct ?    38 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a number be converted to a string?

1395


What are data structures in c and how to use them?

1222


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1141


Is fortran faster than c?

1082


How do you do dynamic memory allocation in C applications?

1140


How can I trap or ignore keyboard interrupts like control-c?

1117


What is declaration and definition in c?

1177


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

1042


Write a simple code fragment that will check if a number is positive or negative.

1209


What is the use of a conditional inclusion statement in C?

1111


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

1137


What is array of pointers to string?

1159


while initialization of array why we use a[][2] why not a[2][]...?

2402


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1083


What is use of #include in c?

1220