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 structure padding in c?

1191


Which programming language is best for getting job 2020?

1101


What is the difference between exit() and _exit() function in c?

1130


What is getch() function?

1109


What do you mean by invalid pointer arithmetic?

1130


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1294


What is a list in c?

1085


which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;

3334


What is difference between class and structure?

1159


What are the types of data files?

1252


Explain how does flowchart help in writing a program?

1169


How can I do peek and poke in c?

1136


What is the difference between typedef struct and struct?

1165


Explain what is the most efficient way to store flag values?

1272


How will you write a code for accessing the length of an array without assigning it to another variable?

1094