C4 Passing Command-Line Arguments to C Programs in the iOS (Mac) Terminal / iOS(Mac) 터미널에서 C 명령어 인수 입력하기 I was extremely stressed because I couldn't figure out how to pass command-line arguments to my C programs. 맥 터미널로 C 명령어 인수를 입력하는 방법을 몰라 꽤나 헤맸다. 해당 포스팅이 도움이 되길! This is my C program. #include int main(int argc, char *argv[]) { int i; printf("agrc : %d\n",argc); printf("\n"); for (i=0; i 2024. 3. 19. Programming with "return": Getting Started with Python and C / 파이썬과 C에서의 "return" What is the return value in Python and C? I will explore this concept using both Python and C. C와 파이썬 각각에서 return이란 무엇일까? 오늘은 해당 개념에 대해 설명해보고자 한다. Basic function of the "return" The fundamental function of the 'return' statement is to return a value from a function. I will initially explain this concept using Python. return의 기본적인 기능은 값을 반환해주는(뱉어주는) 것이다. 먼저 파이썬을 이용해 설명해보겠다. i=0 def test(x): i=x*1.. 2024. 3. 18. C Programming : Concept of Pointer (1) / C언어 포인터 개념의 기초 A pointer contains the memory address of another variable. It points to the memory address, which is why it's called a pointer. 포인터는 메모리 주소를 저장한다. 메모리 주소를 가리킨다(points to)고 생각하면 된다. #include int main() { int a=5; int *pointer; pointer =&a; printf("%p\n", &a); printf("%p\n", pointer); return 0; } OUTPUT 0x16af43168 0x16af43168 int *pointer; Use '*' to declare an integer pointer variable. *를 이용해 in.. 2024. 3. 17. C Programming: Basic structure for Beginners / C언어 기본 구조 I suddenly have to learn C programming for my "Basic Algorithm" class! I haven't taken the prerequisite courses for this course, but I have taught myself the necessary material out of necessity and eagerness to learn. 기초 알고리즘 수업 덕에 갑자기 C언어를 공부하게 되었다. 선수과목 이수를 안했기 때문에 필수적인 내용은 독학해야한다. Today, we will explore the basic structure of the C language. 오늘은 C언어의 간단한 기본 구조에 대해 설명하고자 한다. #include int main(.. 2024. 3. 12. 이전 1 다음