본문 바로가기

학교 & 학원 이론 수업/FPT 회사에서 배운 내용

C언어

C Programming For Beginners 라는 유데미 코스.

(참고로 회사 컴퓨터는 Windows) 

 

 

-C 컴파일러를 Cygwin이라는 컴파일러를 다운받음

-Codelite라는 IDE를 사용

-Using Command Line on Windows  

           -gcc Hello.c  하면은  a.exe 파일이 만들어지고,

           -./a.exe   하면은 파일이 실행됨 

           -gcc HelloWorld.c -o MyProgram

           -gcc --help

 

 

 

(230925, codelearn - C for beginner)

 

 

 

C Programming For Beginners 라는 유데미 코스.

프리프로세서(preprocessor)는 C와 C++ 언어에서 컴파일 과정의 초기 단계로 작동하는 프로그램

Header Files 
           header files define information about some of the functions that are provided by that file 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Q&A Session

- Can we use switch case for float/string?

         - In C programming, the switch-case statement cannot be used with float values or strings directly

 

-예제 ) 

#include <stdio.h>

 

void swap(int *a, int *b)

{

  int temp = *a;

  *a = *b;

  *b = temp;

}

 

int main()
{
    int x = 1, y = 5;
    printf("Before swap x = %d, y = %d\n", x, y);
    swap(&x, &y);
    printf("After swap x = %d, y = %d\n", x, y);

 

    return 0;
}

 

 

(비트연산)

 

 

Array 

 

Character Strings

 

 

 

 

Huy 선생님의 오늘의 연습문제 : 

(정답코드 )

 

포인터 

 

 

(문제)

 

 

(문제)

 

 

(문제)

 

 

 

(문제4)

 

 

 

 

 

이중포인터

 

 

 

이중포인터에 메모리를 할당

 

 

 

 

 

 

'학교 & 학원 이론 수업 > FPT 회사에서 배운 내용' 카테고리의 다른 글

Android (231023)  (0) 2023.10.23
231017 화요일 - java  (0) 2023.10.17
231016 월요일 - java  (0) 2023.10.16
디자인 패턴  (0) 2023.10.16
java  (0) 2023.10.10