Skip to content

Instantly share code, notes, and snippets.

@AlexsJones
Created April 8, 2014 12:52
Show Gist options
  • Save AlexsJones/10119495 to your computer and use it in GitHub Desktop.
Save AlexsJones/10119495 to your computer and use it in GitHub Desktop.
/*
* =====================================================================================
*
* Filename: main.c
*
* Description:
*
* Version: 1.0
* Created: 04/08/14 13:19:50
* Revision: none
* Compiler: gcc
*
* Author: jonesax (),
* Organization:
*
* =====================================================================================
*/
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
int main(int argc, char **argv) {
uint8_t *cargo;
cargo = calloc(sizeof(uint8_t),100);
memcpy(cargo,"str",3);
int x ;
for(x = 0; x < 3; ++x) {
printf("%c",cargo[x]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment