Created
October 9, 2018 07:49
-
-
Save MattBlack85/d8e2d1dd553b5577783e697fd38179c6 to your computer and use it in GitHub Desktop.
This file contains 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> | |
#include <stddef.h> | |
void foo(char **p, size_t lol); | |
void bar(char **p, size_t *lol); | |
void bar(char **p, size_t *lol) { | |
char method[] = "GET"; | |
size_t lol_size = 50; | |
*p = method; | |
*lol = lol_size; | |
} | |
void foo(char **p, size_t lol) { | |
bar(p, &lol); | |
} | |
int main() { | |
char *myp; | |
size_t lol; | |
size_t len; | |
foo(&myp, lol); | |
if (lol == 50) | |
return 0; | |
else | |
printf("Value of lol is: %lu", lol); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment