Pointer

Pointer Declaration for Primitive Data Type

#include<stdio.h>
int main(){

    int a;
    int *p = &a;
    
    float b;
    float *q = &a;
    
    double c;
    double *r = &a;
    
    char d;
    char *s = &a;
    
    void *t = NULL;
    
    return 0;
}

Pointer Declaration for Primitive Data Type Using Dynamic Memory Allocation

Last updated