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

main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}

Answer Posted / ankit panwar

*ptr++ : it just increments the pointer not the value it is
pointing to..

++*ptr : it increments the value the pointer points to but
not the pointer..

here

(*ptr++) + (++*ptr) = 0 + (4+1) = 5

so the answer will definately be 5

Is This Answer Correct ?    2 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is %s and %d in c?

1103


How do you construct an increment statement or decrement statement in C?

1272


Can we declare variables anywhere in c?

1053


Explain data types & how many data types supported by c?

1131


What is spaghetti programming?

1195


Explain how can I read and write comma-delimited text?

1224


How can a program be made to print the line number where an error occurs?

1134


Explain argument and its types.

1111


Explain Function Pointer?

1238


Write a function that will take in a phone number and output all possible alphabetical combinations

1098


What is line in c preprocessor?

1099


Write a program of advanced Fibonacci series.

1203


Array is an lvalue or not?

1186


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

10244


Explain Basic concepts of C language?

1230