Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/articles/c-tutorials/)
-   -   Introduction to Pointers in C (http://www.go4expert.com/articles/introduction-pointers-c-t27959/)

pawansharma 6Jun2012 23:42

Re: Introduction to Pointers in C
 
Excellent example how to use pointer in c.

Healthcare 14Jun2012 09:27

Re: Introduction to Pointers in C
 
I am not sure about the task, but i can try. If you find any mistake, please let me know with explanation.
Code:

#include<stdio.h>

void main()
 {
      long *ptr;          //declaration of pointer variable
      int x=0;            //declaration and initialization of a variable
      ptr=&x;
      printf("The value of x is:" *ptr);
 }



All times are GMT +5.5. The time now is 06:33.