일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- php
- Algospot
- C
- BOJ
- DP
- web
- C언어
- 종만북
- programmers
- String
- 생활코딩
- 정수론
- greedy
- Math
- 따라하면서 배우는 C언어
- 백준
- 따배씨
- dfs
- server
- Algorithm
- Cleancode
- Python
- JavaScript
- BFS
- graph
- 인프런
- BASIC
- 따라하며 배우는 C언어
- sorting
- udemy
- Today
- Total
목록Language (271)
몽상실현개발주의
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cvHtf8/btq65TA53OQ/eY80S0yBEj39s3pl7JgiGK/img.png)
[알고리즘 기초] 03_문자열(string) / Python 1. 문자의 표현 - 컴퓨터에서의 문자의 표현 1) 코드체계 각 문자에 대해서 대응되는 숫자를 정해 놓고 이것을 메모리에 저장하는 방법을 사용 영어의 경우 대소문자 합쳐서 52자 이므로 6비트(64 가지)면 모두 표현 할 수 있다. 이를 코드체계라고 한다. 000000 -> 'a' 000001 -> 'b' 네트워크가 발전하면서 서로간의 정보를 주고 받을 때 정보를 다르게 해석한다는 문제가 발생 지역별 코드 체계가 다르기 때문 2) ASCII Code 표준안을 목적으로 1967년, 미국에서 ASCII(American Standard Code for Information Interchange)라는 문자 인코딩 표준이 제정됨. ASCII는 7bit ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/EQRp3/btq6VaI9sJt/wbMY0r70kXgeyXK976Z7Fk/img.png)
따배씨 - 따라하며 배우는 C언어 11강 문자열 함수들 11.6 다양한 문자열 함수들 #include #include void fit_str(char*, unsigned int); int main(){ // strlen() : return length of the string char msg[] = "Just," " do it!"; puts(msg); printf("Length %lu\n", strlen(msg)); fit_str(msg, 4); puts(msg); printf("Length %lu\n", strlen(msg)); } void fit_str(char* str, unsigned int size){ if (strlen(str) > size){ str[size] = '\0'; } } strle..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bvzCO2/btq6U0NxzaJ/WgklnKkgcI0qgQKtLWEdUk/img.png)
따배씨 - 따라하며 배우는 C언어 11강 문자열 함수들 11.5 문자열을 출력하는 다양한 방법들 #include #define TEST "A string from #define." void custom_put(const char* str); // Only two lines void custom_put2(const char* str); // Add \n, return # of characters int main(){ char str[60] = "String array initialized"; const char* ptr = "String array initialized"; puts("String without \\n"); // String without \n puts("END"); // END puts(T..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/lxMLE/btq6WhnfIeK/oHD5Uobi2Q4nAvgahGbpS0/img.png)
따배씨 - 따라하며 배우는 C언어 11강 문자열 함수들 11.4 문자열을 입력받는 다양한 방법들 입력받은 메모리 공간을 확보한 다음에 입력을 받아야 함 #include #define STRLEN 81 int main(){ char words[STRLEN] = ""; gets(words); // Hello words printf("START\n"); // START printf("%s", words); puts(words); // Hello wordsHello words puts("END."); // END. return 0; } char words[STRLEN] = ""; gets(words); gets 함수는 String 의 첫 주소를 받아서 출력 포인터 하나만 받아서는 사용할 메모리의 크기를 알 수 ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/P2wLl/btq6QNO9fvn/wB5x1uHB29zRQcjQZRpSE0/img.png)
따배씨 - 따라하며 배우는 C언어 11강 문자열 함수들 11.3 문자열의 배열 #include int main(){ const char* mythings[5] = { "Dancing in the rain", "Couting apples", "Watching movies with friends", "Writing sad letters", "Studying the C language" }; char yourthings[5][40] = { "Studying the C++ language", "Eating", "Watching Netflix", "Walking around till dark", "Deleting spam emails" }; const char* temp1 = "Dancing in the rain..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/BDFeW/btq6VsCLh1O/3NsTrtk1ukJQdGsX0KdDYK/img.png)
따배씨 - 따라하며 배우는 C언어 11강 문자열 함수들 11.2 메모리 레이아웃 Memory Layout 과 문자열 char arr[] = "Hello, World"; char* str = "Hello, World"; //str[0] = 'M'; // Error 메모리 레이아웃에서 문제 발생 환경변수 : 프로그램이 실행되는 환경에 대한 변수 Stack : 지역변수들이 저장됨, 메모리의 크기를 Compiler 가 미리 예측할 수 있는 경우에 사용, Compiler 가 준비를 할 수 있기 때문에 처리 속도가 빠름 Heap : 메모리 공간을 알 수 없을 때 사용 Segment : 읽기 전용 메모리, 메모리 공간의 변화 불가 #include int main(){ const char* pt2 = "I am a S..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/xjH9R/btq6VjMKOr9/ijotAzjYymnqa2jS9FnKmK/img.png)
따배씨 - 따라하며 배우는 C언어 11강 문자열 함수들 11.1 문자열 Strings 을 정의하는 방법들 #include #define MESSAGE "A symbolic string contant" #define MAXLENGTH 81 int main(){ char words[MAXLENGTH] = "A string in an array"; const char* pt1 = "A pointer to a string."; puts("Puts() adds a newline at the end:"); // puts() add \n at the end puts(MESSAGE); // A symbolic string contant puts(words); // A string in an array puts(pt1)..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/d6NZNW/btq65dNi4qU/eF571fvxRZW8cQtTl6bjkk/img.png)
[알고리즘 기초] 02_배열 2 (Array 2) / Python 1. 배열 : 2차 배열 1.1 2차원 배열의 선언 1차원 List를 묶어놓은 List 2차원 이상의 다차원 List는 차원에 따라 index를 선언 2차원 List의 선언: 세로길이(행의 개수), 가로길이(열의 개수)를 필요로 함 Python에서는 데이터 초기화를 통해 변수선언과 초기화가 가능함 arr = [[0, 1, 2, 3], [4, 5, 6, 7]] 1.2 2차원 배열의 접근 배열 순회 n X m 배열의 (n * m) 개의 모든 원소를 빠짐없이 조사하는 방법 행 우선 순회 # i 행의 좌표 # j 열의 좌표 for i in range(len(Array)): for j int range(len(Arrary[i])): Array[i]..