Notice
Recent Posts
Recent Comments
Link
목록2025/06/09 (1)
DY의 세상구경

C, C++에서 단어의 끝이 '\0' 으로 끝난다는 것을 알면 어렵지 않게 풀 수 있는 문제 같다.다음 글자가 \0이면 종료되도록 설정#define _CRT_SECURE_NO_WARNINGS#include #include #include using namespace std;int main(){ char word[1000]; int i=0; scanf("%s", word); while (word[i] != '\0') { i++; } printf("%d\n", i); return 0;}
IT/ALGORITHM
2025. 6. 9. 18:16