본문 바로가기
Programming/C++

[C] Struct Reference

by OKOK 2017. 3. 28.

/*------------------------------------------------------------------------------------------

@ Pratice C laguage


Author           : SAM

Created          : 28-03-2017

Modified         : 28-03-2017

Language/ver     : C in MSVS2015


Description     : Practice : TelPhone1.c


KEYWORD : Struct, Reference

------------------------------------------------------------------------------------------*/


#include<stdio.h>


struct simple {

int data1;

int data2;

};


int main() {

struct simple s = { 1,2 };


printf("address1 : %d\n", &s);

printf("address2 : %d\n", &(s.data1));


return 0;


}