Created
January 8, 2016 19:51
-
-
Save ehermes/9023d513e763044932f0 to your computer and use it in GitHub Desktop.
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 <stdint.h> | |
| #include <unistd.h> | |
| struct atom { | |
| double pos[3]; | |
| uint8_t symbol[2]; | |
| }; | |
| void main() | |
| { | |
| struct atom my_atom = {.pos = {0,1,2}, .symbol=" H"}; | |
| printf("My atom's symbol: %s \n", my_atom.symbol); | |
| printf("My atom's X position is: %f \n", my_atom.pos[0]); | |
| printf("My atom's Y position is: %f \n", my_atom.pos[1]); | |
| printf("My atom's Z position is: %f \n", my_atom.pos[2]); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment