Getting javascript assertion error for following program.
include <stdio.h>
include <stdlib.h>
include <string.h>
char* getGreeting();
char* str;
int main()
{
printf("hello, world\n");
printf(getGreeting());
}
char *getGreeting()
{
str = malloc(2000);
strcpy(str, "hello");
}
Getting javascript assertion error for following program.
include <stdio.h>
include <stdlib.h>
include <string.h>
char* getGreeting();
char* str;
int main()
{
printf("hello, world\n");
printf(getGreeting());
}
char *getGreeting()
{
str = malloc(2000);
strcpy(str, "hello");
}