Skip to content

Instantly share code, notes, and snippets.

@TheCodeEngine
Created April 24, 2013 11:43
Show Gist options
  • Save TheCodeEngine/5451526 to your computer and use it in GitHub Desktop.
Save TheCodeEngine/5451526 to your computer and use it in GitHub Desktop.
Funktion with pointer
#include <stdio.h>
#include <stdlib.h>
void incnum(int *number)
{
fprintf(stdout, "Original Number:%d\n", *number);
*number += 1;
fprintf(stdout, "Increment Number: %d\n", *number);
}
int main(int argc, char const *argv[])
{
/* Dynamischer Test */
int number = 100;
incnum(&number);
return EXIT_SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment