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


what is pointer



what is pointer..

Answer / vignesh1988i

a pointer is an memory location in which it holds a particular ADDRESS of a particular data type. and mean while through the ADDRESS it will point to that corresponding value in that data typed variable.
DECLARATION OF A POINTER VARIABLE :
int *pointer_variable;

for eg:
int a=45; //line 1
int *b; // line 2
b=&a; //line 3
printf("%d\n",*b); //line 4

explanation:

line 1 :
consider let address of the location 'a' be 1000, which contains a value 45 of integer data type.
line 2 :
*b , represents the integer pointer which can hold an integer variable address.
line 3 :
when we take any variable such as int a or int c etc, when we call as 'a' we will refer to the content inside 'a' (for eg.),in the same way as in the above coding *b is given . but b=&a; this means when we call 'b' the content (ie) the address of variable 'a', and that 'b' will be pointing indirectly the value of 'a' through the 'a's address.
line 4 :
when we want to refer to that pointed value we must give as *pointer_variable & here *b when you give the same 45 will get printed.




thank u

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More C Interview Questions

Where are some collections of useful code fragments and examples?

0 Answers   Celstream,


Which is the best website to learn c programming?

0 Answers  


how to write optimum code to divide a 50 digit number with a 25 digit number??

0 Answers   MGM,


#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.

0 Answers  


how would a 4*3 array A[4][3] stored in Row Major Order?

0 Answers   HCL, Ignou,


How does memset() work in C?

2 Answers  


what is the use of c program?

4 Answers   Synergy, Web Synergies,


Difference between pass by reference and pass by value?

0 Answers   TCS, TISL,


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

0 Answers   Wipro,


Write a program to generate prime factors of a given integer?

9 Answers   Microsoft,


What is a method in c?

0 Answers  


code for copying two strings with out strcpy() function.

6 Answers  


Categories