21 lines · c
1#include <stdio.h>2#include <stdlib.h>3#include <string.h>4 5#include "present.h"6#include "to-be-removed.h"7 8const int main_const_data = 5;9int main_dirty_data = 10;10int main(int argc, char **argv) {11 12 to_be_removed_init(argc);13 present_init(argc);14 main_dirty_data += argc;15 16 char *heap_buf = (char *)malloc(80);17 strcpy(heap_buf, "this is a string on the heap");18 19 return to_be_removed(heap_buf, main_const_data, main_dirty_data);20}21