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...

int arr[] = {1,2,3,4}
int *ptr=arr;

*(arr+3) = *++ptr + *ptr++;

Final contents of arr[]

Answer Posted / vijaisankar

In this statement
first ptr holds base address of the array(4000),
then as per precedence operators ptr gets post incremented
(4002)though it points the value 1(4000)(ptr is post
incremented) and then ptr gets preincrement so (4004) the
value in that one is 3 then 3+1=4.
*(arr+3)=3;

Is This Answer Correct ?    2 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are keywords c?

1030


What is an endless loop?

1276


write a programming in c to find the sum of all elements in an array through function.

2176


Disadvantages of C language.

1105


A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.

1718


What does c mean in basketball?

997


why do some people write if(0 == x) instead of if(x == 0)?

1075


What is extern storage class in c?

996


What is nested structure?

1040


Why c is called object oriented language?

1069


What is the process to generate random numbers in c programming language?

1177


What is identifier in c?

1013


Where static variables are stored in c?

1109


What happens if header file is included twice?

1150


Is main an identifier in c?

1144