본문 바로가기

Developer

검색하기
Developer
프로필사진 DPhater

  • 분류 전체보기 (46)
    • Programming Language (39)
      • C++ (8)
      • C (28)
      • Python (2)
      • Swift (0)
    • Algorithm (0)
    • AI (1)
    • Security (0)
    • 42seoul (6)
      • Libft (3)
      • get_next_line (0)
      • ft_printf (0)
      • netwhat (0)
      • ft_server (3)
    • Data_structure (0)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2026/04   »
일 월 화 수 목 금 토
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 29 30
Tags
  • 패킹
  • phpmyadmin
  • python
  • 42cursus
  • 42
  • 42Seoul
  • iF
  • 동적할당
  • vs코드 단축키
  • While
  • 구조체
  • cout
  • list
  • libft
  • for
  • nginx
  • 포인터
  • ft_server
  • Class
  • docker
  • C언어
  • 2차원배열
  • Double
  • 함수
  • jupyter 단축키
  • 자료형
  • 42서울
  • C++
  • float
  • else if
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록struct (1)

Developer

20.(C언어) 구조체(1)

구조체란 서로 다른 자료형의 여러 변수들을 하나의 묶음으로 사용할 수 있게 해준다. 기본 자료형을 조합해서 새로운 자료형을 만든다고 생각하면 된다.학생의 정보를 관리하기 위해 구조체를 사용해 보자. 정보 항목은 이름, 전화번호, 학번 3가지만 하겠다. #include #include struct Student{ char name[30]; //이름 char phone_number[30]; //전화번호 int student_id; //학번 }; int main(){ struct Student s; strcpy(s.name,"김모군"); strcpy(s.phone_number,"010-xxxx-xxxx"); s.student_id=123456; printf("%s\n",s.name); printf("%s\n"..

Programming Language/C 2020. 8. 1. 21:49
Prev 1 Next

Blog is powered by AXZ / Designed by Tistory

티스토리툴바