본문 바로가기

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
«   2025/07   »
일 월 화 수 목 금 토
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 31
Tags
  • nginx
  • 함수
  • ft_server
  • C++
  • Double
  • for
  • docker
  • Class
  • python
  • While
  • else if
  • cout
  • C언어
  • phpmyadmin
  • 42Seoul
  • 42
  • vs코드 단축키
  • 42cursus
  • iF
  • libft
  • 2차원배열
  • 동적할당
  • 패킹
  • 자료형
  • float
  • 구조체
  • 42서울
  • 포인터
  • list
  • jupyter 단축키
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록구조체포인터 (1)

Developer

21.(C언어) 구조체(2)

구조체도 다른 자료형과 같이 포인터, 배열을 사용할 수 있다. 구조체 포인터 #include #include typedef struct Student{ char name[30]; //이름 char phone_number[30]; //전화번호 int student_id; //학번 }Student; int main(){ Student s={"김모군","010-xxxx-xxxx",123456}; Student *sp; sp=&s; printf("-> 사용\n"); printf("%s\n",sp->name); printf("%s\n",sp->phone_number); printf("%d\n",sp->student_id); printf("\n역참조 사용\n"); printf("%s\n",(*sp).name); p..

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

Blog is powered by kakao / Designed by Tistory

티스토리툴바