강의

멘토링

커뮤니티

Inflearn Community Q&A

swo981960's profile image
swo981960

asked

Learn C Programming by Following Along with Hong Jeong-mo

14.8 Structure and Function Practice Problems

예제 두 번째 문제

Written on

·

188

1

struct name_count receive_input();

struct name_count count_characters(struct name_count);

  이 둘은 구조체인데 함수처럼 파라미터를 갖고있고 반환값도있는건가요? struct로 선언을 해줬는데 함수처럼 사용될 수 있는건가요?

c

Answer 1

1

정확히 말씀드리자면 

name_count라는 구조체가

receive_input 함수의 리턴값으로 사용된 것이고,

count_characters 함수의 인자와 리턴값으로 사용된 것입니다

 

struct name_count를 하나로 묶어서 생각해보세요 :)

 

swo981960's profile image
swo981960

asked

Ask a question