Skip to content

Instantly share code, notes, and snippets.

@sojohnnysaid
Last active January 19, 2021 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sojohnnysaid/368195e9817b032276b93c65fbe0a31c to your computer and use it in GitHub Desktop.
Save sojohnnysaid/368195e9817b032276b93c65fbe0a31c to your computer and use it in GitHub Desktop.
gdb playground
#include <stdio.h>
void party_time();
int main(void){
printf("hw\n");
char x[] = {'a','b','c','d'};
int length = sizeof x / sizeof x[0];
party_time();
for(int i = 0; i < length-1; i++)
printf("%i\n", x[i]);
return 0;
}
void party_time(){
char* x = "Hello";
int y = 42;
char z = 'm';
printf("party time! %s | %i | %c\n", x, y, z);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment