Created
April 24, 2013 11:43
-
-
Save TheCodeEngine/5451526 to your computer and use it in GitHub Desktop.
Funktion with pointer
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> | |
| #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