Skip to content

Instantly share code, notes, and snippets.

@pkrll
Created May 26, 2019 12:03
Show Gist options
  • Save pkrll/cf234c0b97f3c44d56be2152a8a186e4 to your computer and use it in GitHub Desktop.
Save pkrll/cf234c0b97f3c44d56be2152a8a186e4 to your computer and use it in GitHub Desktop.
Question 3
#include <stdio.h>
void bar(int *y) {
char *msg = "hello, world";
puts(msg); /// P
*y = 84;
}
int foo(int i, int *x) {
int z;
if (i > 1024)
*x = 42;
else
z = *x;
bar(&z);
return 0;
}
int main() {
//!showGraph()
int z;
int r = foo(7, &z);
return r;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment