23 lines · c
1#include <stdio.h>2#include <stdlib.h>3 4#include "present.h"5 6const int present_const_data = 5;7int present_dirty_data = 10;8 9void present_init(int in) { present_dirty_data += 10; }10 11int present(char *to_be_removed_heap_buf, int to_be_removed_const_data,12 int to_be_removed_dirty_data) {13 char *present_heap_buf = (char *)malloc(256);14 sprintf(present_heap_buf, "have ints %d %d %d %d", to_be_removed_const_data,15 to_be_removed_dirty_data, present_dirty_data, present_const_data);16 printf("%s\n", present_heap_buf);17 puts(to_be_removed_heap_buf);18 19 puts("break here");20 21 return present_const_data + present_dirty_data;22}23