Easy learning with example program codes

C Pointers

C pointers can be defined as a variable, pointing towards the address of a value.


Data_type *variable_Name;

Advantages of using Pointers in C:

  • Improves the performance.
  • Frequently used in arrays, structures, graphs and trees.
  • Less number of lines needed in a code.
  • Useful in accessing any memory location.
  • Used in Dynamic Memory Allocation.

NULL Pointer:

NULL pointers either have no value or NULL value assigned to it.


int sum(int *a, int *b)
int *c;
*c = *a + *b;
return *c;
void main()
int x = 100;
int y = 200;
int add;
add = sum(&x,&y);
printf ("%d + %d = %d", x,y,add);


100 + 200 = 300
Posted in C   

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki