강의

멘토링

로드맵

Inflearn Community Q&A

slam's profile image
slam

asked

Learn C Programming by Following Along with Hong Jeong-mo

14.26 Array of function pointers practice problem

while(*str)??

Written on

·

560

1

void Transpose(char* str)

{

while (*str)

{

if (islower(*str))

*str = toupper(*str);

else if (isupper(*str))

*str = tolower(str);

str++;

}

1. 트랜스포즈함수에서 while문 조건식에 (*str)이 의미가 뭘까요?? *str에 값이 있다면 while문으로 들어가서 실행해라는 의미인가요?

c

Answer 1

2

그쵸!  *str가 '\0' 값이 아닐 때만 while문을 돌겠습니다.  

slam's profile image
slam

asked

Ask a question