반응형
#include <stdio.h>

void printIntVar(char *name, int value){ 
  printf("%s\t = %d\n", name, value); 
} 

int main(){ 
    int n; 

    printf("숫자 n를 입력해 주세요 : "); 
    scanf("%d",&n); 
    printIntVar("n",n); 
    printIntVar("*&n",*&n); 
    printf("%d",&n); 
    return 0; 
} 
/* 

숫자 n를 입력해 주세요 : 275 
n        = 275 
*&n      = 275 
&n       = 6487580 

-------------------------------- 
Process exited after 4.217 seconds with return value 0 
계속하려면 아무 키나 누르십시오 . . . 
*/



반응형

'2019~2020 > 자료구조' 카테고리의 다른 글

list3  (0) 2019.05.28
swap 함수  (0) 2019.05.21
포인터 제 1 법칙 - 1  (0) 2019.05.20
포인터 실습  (0) 2019.05.17
List(리스트)  (0) 2019.05.17

+ Recent posts