error: initializer element is not constant

  c

Email

Error code

#include <stdio.h>
#include <stdlib.h>
int *p = (int*)malloc(sizeof(p));

int main(void)
{
*p = 10;
printf(“%d”, *p);
}

 

Spread the Code

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of