diff --git a/Uebungen/01_AdvC01.cpp b/Uebungen/01_AdvC01.cpp new file mode 100644 index 0000000..3a60357 --- /dev/null +++ b/Uebungen/01_AdvC01.cpp @@ -0,0 +1,28 @@ +/* + * C1.cpp + * + * Created on: 03.05.2018 + * Author: hendrik + */ + +#include +using namespace std; + +unsigned int app(unsigned short int us1, unsigned short int us2) { + + unsigned int ret = us1; + ret = ret << 8; + ret = ret + us2; + return ret; +} + +int main() { + unsigned int (*appPointer)(unsigned short int, unsigned short int); + appPointer = app; + unsigned short int us1 = 10; + unsigned short int us2 = 10; + printf("us1: %x\n", us1); + printf("us2: %x\n", us2); + printf("Ergebnis: %04x ", appPointer(us1, us2)); + return 0; +}