You are here:   HomeC Programming (Pratical)C Program Write a Program to Check the Day in Month
by Dinesh Thakur Category: C Programming (Pratical)

In this program user ask to convert a value to pointer check address of variable. User declares some variables for this to contain the value in it. User declare <math.h> header file for math functions like pi etc. the type of variable is differ like some are double, integer, char type etc. user print out the method for conversing in pointer type to using all the method for conversion display the result as output.

Problem Statement:

This is C program to convert the value into pointer.

  1. Declare the variables.
  2. Using conversion method.
  3. Display result on the screen.

Here is C source code to convert the value into pointer. The output of this program shown below. 



#include <stdio.h>
#include <math.h>
int main ()
            {          
            char                 *pc = 0;
            int                    *pi = 0;
            double       *pd = 0;
  printf("%8d%8d%8d\n",*pc,*pi,*pd);
  printf("%8d%8d%8d\n", pc+1, pi+1, pd+1);
  printf("%8d%8d%8d\n", pc+3, pi+5, pd+7);        
            return 0;
            }
 Convert a Value to Pointer Check Address of Variable


Search Content







Advance Courses



Basic Courses



Advertise with Us