ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
what is pointer
 Question Submitted By :: Sudipta Kumar Mondal
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is pointer
Answer
# 1
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 ?    2 Yes 0 No
Vignesh1988i
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What should be keep precautions while using the recursion method?  1
What's the difference between a linked list and an array?  11
The C language terminator is a.semicolon b.colon c.period d.exclamation mark TCS3
CAN WE DEFINE ANY FUNCTION WITHIN A FUNCTION.  6
what is pointer ? Kernex-Micro-Systems7
what is link list?  2
How can draw a box in cprogram without using graphics.h header file & using only one printf(); ? NIIT1
what is a c-language.what is do. HCL3
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type  5
what is the difference between malloc() and calloc() function?  1
what about "char *(*(*a[])())();" Oracle2
print ur name without using any semicolon in c/c++....  6
5. distance conversion: Convert a distance from miles to kilometers .there are 5280 feets per mile,12 inches per foot .2.54 centimeters per inch and 100000centimeters per kilometer  1
write an interactive program to generate the divisors of a given integer. TCS4
what is the diference between pointer to the function and function to the pointer?  2
why r u join this company? give solid resons. Infosys7
Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above Accenture3
what is dangling pointer? LG-Soft1
write a “Hello World” program in “c” without using a semicolon?  3
can i know the source code for reversing a linked list with out using a temporary variable? Honeywell6
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com