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 / yatish m yadav

The wrong answer is
d> *(*pa+5)
here value pointed to by pa is accessed and added 5 to it
then trying to print the value at that address, which gives
us an warning with some garbage value.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string length in c?

1063


What is the best way to store flag values in a program?

1057


How do you convert strings to numbers in C?

1213


Write a code to remove duplicates in a string.

1013


Is it possible to initialize a variable at the time it was declared?

1204


What is break statement?

1109


What is the difference between far and near ?

1183


How to get string length of given string in c?

1051


What are the 5 organizational structures?

1014


Describe explain how arrays can be passed to a user defined function

1083


How can I get random integers in a certain range?

1046


All technical questions

1970


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1099


What is a #include preprocessor?

1128


The statement, int(*x[]) () what does in indicate?

1129