C program to print sizes of different type of pointers
/*C program to print size of different types of pointer variables.*/
#include <stdio.h>
int main()
{
printf("\nsize of char pointer: %d" ,sizeof(char*));
printf("\nsize of int pointer: %d" ,sizeof(int*));
printf("\nsize of float pointer: %d" ,sizeof(float*));
printf("\nsize of long int pointer: %d" ,sizeof(long int*));
printf("\nsize of double pointer: %d\n" ,sizeof(double*));
return 0;
}
Output
size of char pointer: 4
size of int pointer: 4
size of float pointer: 4
size of long int pointer: 4
size of double pointer: 4
~~~~ Output depends on the system architecture, ~~~~ but each type of pointer will take same memory space ~~~
C program to print sizes of different type of pointers
Output
~~~~ Output depends on the system architecture,
need an explanation for this answer? contact us directly to get an explanation for this answer~~~~ but each type of pointer will take same memory space ~~~