This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
int main() { | |
//!showGraph() | |
int **x = malloc(sizeof(int*)*2); | |
int *y = malloc(sizeof(int)); | |
*x = y; | |
free(y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main() { | |
//!showGraph() | |
char *a = "Foo"; | |
char b[2] = "42"; | |
char c[2] = "84"; | |
a = c; | |
a += 2; | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
struct bar { | |
char *g; | |
}; | |
struct foo { | |
struct bar *f; | |
int *y; | |
int *z; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
class NumberToIndexTransformer: NSValueTransformer { | |
func decrementNumber(value: AnyObject) -> AnyObject { | |
if var value = value as? NSNumber { | |
value = Int(value) - 1 | |
return value | |
} | |