Name: Anonymous 2011-01-18 22:44
#include <stdlib.h>
int * b;
int main(void)
{
int * a = NULL;
a = (int *) malloc(sizeof(int));
b = &a;
free(b);
return 0;
}Would this result in a memory leak? If yes, why?
#include <stdlib.h>
int * b;
int main(void)
{
int * a = NULL;
a = (int *) malloc(sizeof(int));
b = &a;
free(b);
return 0;
}#include <stdbool.h>
#include <stdio.h>
int main(void) {
bool yes = true, no = false;
if (yes || no) printf("Why?");
return 0;
}b = &a;b = a;?
a =(int *) malloc(sizeof(int));(define-syntax >implying
(syntax-rules (that is called with)
((>implying proc is called with vars ... and var)
(curry proc vars ... var))))
((>implying + is called with 2 3 and 4) 5) ; 14
#include <stdlib.h>
int * b;
int main(void)
{
int * a = NULL;
a = (int *) malloc(sizeof(int));
b = a;
free(b);
return 0;
}void* away, it's C++ that bitches about it.