강의

멘토링

커뮤니티

Inflearn Community Q&A

jongdeu's profile image
jongdeu

asked

Learn C Programming by Following Along with Hong Jeong-mo

12.9 Internal linkage of static variables

정적 변수의 내부 연결

Written on

·

295

0

 정적 변수의 내부 연결은 referencing delclaration이 

없는 건가요?

c

Answer 3

2

jongdeu님의 프로필 이미지
jongdeu
Questioner

그럼 static keyword가 붙으면 referencing declaration 이라는 개념 자체가 없는 건가요?

0

아래와 같은 사용은 가능합니다.

#include <stdio.h>
static int a = 3;
int main(int argc, char* argv[])
{
	extern int a; //optional
	printf("%d\n", a);
	return 0;
}

0

안녕하세요?
static keyword 를 붙이는 것은 다른 파일에서 사용하지 못하도록 하겠다는 의미도 가지고 있습니다.

jongdeu's profile image
jongdeu

asked

Ask a question