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[] = {1,2,23,6,5,6};
printf("%d",&ptr[3]-&ptr[0]);
}

Answer Posted / dipak

In int at least 2 bytes are used for size and we know that &ptr[] gives the address of ptr .
&ptr[3]-&ptr[0]
Size of &ptr[3] is 3*2=6 times greater than Size of &ptr[0] is 1*2=2
ptr[0] also have any value that's why I consider it 1
So 6-2=4

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can true be a variable name in c?

1039


What is mean by data types in c?

1030


What is the use of parallelize in spark?

1030


What is header file in c?

1072


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

1055


Explain how do you convert strings to numbers in c?

1080


Differentiate between #include<...> and #include '...'

1053


Write a program to reverse a given number in c?

1039


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

1156


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1069


What is getche() function?

1042


What is #define used for in c?

1062


ATM machine and railway reservation class/object diagram

5250


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

1149


What is linear search?

1134