c (24) 썸네일형 리스트형 Characters and Strings #2 https://velog.io/@qmasem/C%EC%96%B8%EC%96%B4-%EC%95%BD%EC%96%B4%EC%9D%98-%EC%9D%98%EB%AF%B8 C언어 약어의 의미이름의 의미를 알면 이해가 되어 저절로 암기가 되기에 새로운 언어를 배울 때 약어를 항상 찾아보는 편입니다.최근 C언어를 공부하면서 궁금했던 약어들을 모아놓은 블로그를 보았습니다.계속velog.io 문자열 검색 함수 char *strchr(const char *s, int c);strchr(대상문자열, 검색할문자);문자열 s에서 문자 c의 첫 번째 발생을 찾습니다. c가 발견되면, s에서 c에 대한 포인터가 반환됩니다. 그렇지 않으면, NULL 포인터가 반환됩니다.size_t strcspn(const char *s1, con.. Characters and Strings #1 문자 처리 라이브러리 ; 각 함수는 부호 없는 문자 또는 EOF 를 인수로 받는다.문자는 종종 정수로 조작되는데, 이는 문자가 1byte 정수이기 때문이다. PrototypeFunction description (함수 설명)int isblank(int c); c가 텍스트의 단어를 구분하는 공백 문자일 경우 참 값을 반환하고, 그렇지 않으면 0(거짓)을 반환합니다. [참고: 이 함수는 Microsoft Visual C++에서 사용할 수 없습니다.]int digit(int c);c가 숫자일 경우 참 값을 반환하고, 그렇지 않으면 0(거짓)을 반환합니다int isalpha(int c);c가 문자일 경우 참 값을 반환하고, 그렇지 않으면 0(거짓)을 반환합니다.int alnum(int c); c가 숫자 또는 .. C Pointer Exercise #1 7.1Answer each of the following:a) A pointer variable contains as its value the ______ of another variable.b) The three values that can be used to initialize a pointer are ______ , ______ , and ______ .c) The only integer that can be assigned to a pointer is ______ . 각각의 다음 질문에 답하시오:a) 포인터 변수는 다른 변수의 ______ 를 값으로 갖는다.주소b) 포인터를 초기화하는 데 사용할 수 있는 세 가지 값은 ______ , ______ , 그리고 ______ 이다.0, NULL, an.. C Pointer #3 포인터 배열 const char *suit[4] = {"Hearts", "Diamonds", "Clubs", "Spades"}; - const char *suit[4]: 4개의 요소를 가진 배열을 정의하며, 각 요소는 const char 타입의 포인터다. 즉, 각 요소는 문자열을 가리킴.// Fig. 7.24: fig07_24.c// Card shuffling and dealing. 카드 섞기 및 나누기#include #include #include #define SUITS 4#define FACES 13#define CARDS 52// prototypesvoid shuffle(unsigned int wDeck[][FACES]); // shuffling modifies wDeckvoid deal(unsi.. C Pointers #2 포인터를 이용한 버블정렬 - C 언어는 기본적으로 함수에 인수를 전달할 때 "값에 의한 전달(pass by value)" 방식을 사용( 함수가 인수를 받으면 그 인수의 복사본을 만든다는 의미 )따라서 함수 내부에서 인수의 값을 변경하더라도 원래 변수에는 영향을 미치지 않는다. - C는 함수의 정보를 전달 할 때, 개별 배열의 요소에 접근할 수 없다.- 따라서 '배열 요소에 접근' 하기 위해서 '각 요소의 주소 를 전달' 한다.- 참조에 의한 전달을 통해 값 자체가 아닌 값의 주소를 전달하여 간접적으로 값에 접근할 수 있다.- 배열이 함수에 전달될 때 함수는 배열의 첫 번째 요소의 메모리 주소를 받는다.- 주소는 '배열의 요소 수를 전달하지 않음' 으로, 배열 크기를 함수에 전달해야 한다. - 정리하자면,.. C arrays #3 배열을 사용해 평균, 중앙값, 최빈값 구하기// Fig. 6.16: fig 06_16.c// Survey data analysis with arrays: 배열을 사용한 설문 조사 데이터 분석// Computing the mean, median and mode of the data.// 데이터의 평균, 중앙값 및 최빈값 계산#include #define SIZE 99//function prototypesvoid mean(const unsigned int answer[]);void median(unsigned int answer[]);void mode(unsigned int freq[], unsigned const int answer[]);void bubbleSort(int a[]);void printArr.. array exercises #2 6.6 Fill in the blanks in each of the following:6.6 다음의 빈칸을 채우시오: a) Arrays are _______ entities as they remain the same size during program execution.static b) An array is a _______ group of memory locations that share the same _______.contiguous c) The first element in every array is the _______ element, for example, the first element of an array is referred to as _______.zero-th (0th) , array.. array exercise #1 6.1 Answer each of the following:a) Lists and tables of values are stored in _______.b) The number used to refer to a particular element of an array is called its _______.c) A(n) _______ should be used to specify the size of an array because it makes the program more modifiable.d) The process of placing the elements of an array in order is called _______ the array.e) Determining whether an array.. 이전 1 2 3 다음