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

How can I discover how many arguments a function was actually called with?

1073


When should a far pointer be used?

1140


What are the primitive data types in c?

1085


One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.

2645


Is stack a keyword in c?

1094


write a program to display all prime numbers

1977


What is an expression?

1066


Can you write the algorithm for Queue?

2127


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

1259


Explain the difference between structs and unions in c?

1029


Why is sizeof () an operator and not a function?

1035


Explain what are multibyte characters?

1205


What is the advantage of c?

1133


What is array within structure?

1131


What are the disadvantages of external storage class?

1062