How to initializing pointers in C

1 Answer

0 votes
#include <stdio.h>

int main(void)
{
    int *ip = NULL; 
    char *cp = NULL;
    float *fp = NULL;
    
    printf("%p\n", ip);
    printf("%p\n", cp);
    printf("%p\n", fp);
  
    return 0;
}
  
    
/*
run:
  
0000000000000000
0000000000000000
0000000000000000

*/

 



answered Jul 28, 2017 by avibootz
edited Jul 28, 2017 by avibootz

Related questions

3 answers 155 views
2 answers 128 views
2 answers 140 views
1 answer 166 views
2 answers 214 views
1 answer 135 views
135 views asked Aug 6, 2020 by avibootz
...