• 검색 결과가 없습니다.

[2011 03 17].Ch3.변수란무엇인가

N/A
N/A
Protected

Academic year: 2021

Share "[2011 03 17].Ch3.변수란무엇인가"

Copied!
13
0
0

로드 중.... (전체 텍스트 보기)

전체 글

(1)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

컴퓨터공학실습 1

Part 1

Ch3. 변수란 무엇인가

2011-03-17

1

(2)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

목차

변수의 정의와 선언 방법

변수 선언 시 유의할 점

변수의 시작 주소와 & 연산자

2

(3)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수의 정의와 선언 방법

변수란 ?

데이터를 저장하기 위한 임시 저장 공간 ( 메모리 공간 )

(4)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수의 정의와 선언 방법

변수 선언 예 :

(5)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수의 정의와 선언 방법

변수의 종류

정수형 : char, short, int, long 형

실수형 : float, double, long double 형

(6)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수의 정의와 선언 방법

데이터란 ?

변수에 저장되는 값

(7)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수의 정의와 선언 방법

변수의 초기화

변수 선언과 동시에 초기화를 하는 것이 좋음

7

초기화 하지 않은 변수 값

사용 시 의미 없는 값 출

(8)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수의 정의와 선언 방법

변수에 저장된 값 변경

변수 선언 후 변수에 저장된 값을 자유롭게 변경 가능

8

변수에 저장된 값 변경

(9)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수 선언 시 유의할 점

변수 선언은 제일 앞쪽에 한다

(10)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수 선언 시 유의할 점

변수의 이름은 의미 있게 짓는다

(11)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수 선언 시 유의할 점

변수 이름 규칙에 따른다

특수 문자 , 공백 문자 , 맨 처음 숫자 사용 불가

(12)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수 선언 시 유의할 점

변수 이름 규칙에 따른다

C 언어는 대소문자 구분

키워드 사용 불가

ANSI C 표준 키워드

12

(13)

Intelligence Modeling Lab.

School of Information and Communication Engineering, Sungkyunkwan University

변수의 시작 주소와 & 연산자

변수의 시작 주소

해당 변수가 저장된 메모리 상의 위치 ( 주소 )

& 연산자로 접근 가능

13

참조

관련 문서

Professor of Medicine, Division of Infectious Diseases Director, Infection Control Office.. SUNGKYUNKWAN UNIVERSITY

Sungkyunkwan Univ., Energy Mechatronics Lab... Sungkyunkwan Univ.,

– 주어진 함수를 다른 변수에 종속하는 새로운 함수로 만드 는 적분 형태의 변환 (예.. School of Mechanical Engineering

• Raoult’s law reveals that the vapor pressure of a component in an ideal solution is proportional to its mole fraction... • Some solutions depart significantly

Infinite Voltage Gain Very Large

• In a attraction-dominant condition, when a gas expands, some kinetic energy of them must be converted to potential energy to reach greater

™ 선언된 이름의 바인딩 정보를

School of Mechanical Systems Engineering Chonnam National University..