본문 바로가기

전체 글

06 For 06-11. comma operator #define _CRT_SECURE_NO_WARNINGS #include int main() { for (int n=1, nsqr = n*n; n i++ is operated before comma printf("%d %d \n", i, j); } 제논의 역설 시뮬레이션 예제 절대 따라갈 수 없는 토끼와 거북이 이야기를 들어본 적이 있을 것이다. int main() { /* Simulatino of Moving object */ const double speed = 1.0; const unsigned repeat_max = 7; // 최대 반복 횟수는 보통 양의 정수이기때문에 함(걍 int써도 됨) double dt = 1.0; double time = 0.0; /.. 더보기
09 Linear transformation examples Linear transformation examples: Scaling and reflections Linear transformation examples: Rotations in R2 The rotation of some vector x is going to be equal to a counterclockwise theta degree rotation of x. Rotation in R3 around the x-axis You can generalize in R3. You can try this also in y, z axis. Unit vector unit vector is a vector that has length of 1. At any of dimension, it has length of 1. 더보기
08 Functions and linear transformations A more formal understanding of functions Range: subset of the codomain that the function actually maps to Vector transformation Linear transformations Let's see this Transformation is a lienar treanformation. We have to check the conditions. This conficts with the requirement for a linear tranformation. So this is not a linear transformation! Matrix vector products as linear transformations By m.. 더보기
04 연산자 반복 루프와의 첫 만남 // Case 1: goto문 int n = 1; label: printf("%d\n", n); n = n + 1; if (n == 10) goto out; goto label; // 쓸일이 없을 것. out: return 0; // Case 2: while 문 int main() { int n = 1; while (n < 11) { printf("%d\n", n); n = n + 1; } return 0; } 대입 연산자와 몇 가지 용어들 메모리에 있는 Object들을 Object Data라고 부른다.(int i) 어떤 데이터가 메모리 안에 존재하고 있다면 그것이 Data object이다. 1024는 말 그대로 상수를 의미하지, 어떤 메모리 내 데이터를 의미하지 않는다. 반면에,.. 더보기
07 Null space and column space Matrix vector products What we want to do now in this video is relate our notion of a matrix to everything we already know about vectors. Let's define what is means when we take the product of our matrix A with some vector x. Our definition will only work if the vector x has the same number of components as A has columns. This matrix A also can be represented like this. Now the interesting here .. 더보기
03 문자열과 형식 맞춘 입출력 문자열 입출력하기 #define _CRT_SECURE_NO_WARNINGS #include int main() { char fruit_name; //stores only one character printf("what is your fruit? \n"); scanf("%c", &fruit_name); // & printf("You like %c \n", fruit_name); return 0; } 다음과 같이 문자열 한 글자를 입력받을 수 있다. 여러 문자열을 입력받고 싶다면 아래와 같이 입력하면 된다. #define _CRT_SECURE_NO_WARNINGS #include int main() { char fruit_name[40]; //stores only one character printf("wh.. 더보기
02 데이터와 C언어 변수와 상수 int angel = 1004; 변수: 어떤 값이 저장될 수 있는 메모리 공간 리터럴 상수(literal constant): 문자 그대로의 의미를 갖고 값이 변하지 않는 수 scanf() 함수의 기본적인 사용법 #include int main() { int i = 0; scanf("%d", &i); // & : ampersand printf("value is %d \n", i); return 0; } 이렇게 코드를 짠 후 build를 하면 오류가 나온다. 이를 해결하기 위해서는 2가지 방법이 있다. 코드 제일 위에 #define _CRT_SECURE_NO_WARNINGS 삽입 project - properties - C/C+ - preprocessor에 define _CRT_SECURE_NO.. 더보기
01 C 언어를 소개합니다. 앞으로 작성할 내용들은 홍정모 교수님의 강의에 저작권이 있음을 밝힙니다. 문제가 될시 글을 삭제하겠습니다. https://www.inflearn.com/course/following-c/dashboard 홍정모의 따라하며 배우는 C언어 - 인프런 | 강의 '따배씨++'의 성원에 힘입어 새롭게 개발된 C 언어로 시작하는 프로그래밍 입문 강의입니다. '따배씨'와 함께 프로그래밍 인생을 업그레이드 해보세요., - 강의 소개 | 인프런... www.inflearn.com 더보기