Programming Lecture 2. constant and variable ~ function

in #tipssoft7 years ago

TIPS강좌배너.png

2017.1.8 lecture

Last Monday I go to Microsoft of Korea branch for my lecture.
The instructor is Seong-yeop Kim who is director of tipssoft. He is microsoft MVP of c++ programming.

I learn about constant and variable to function

--constant and variable--

constant : fixed value
variable : A symbol that represents a value than could be changed

constant is divided 3 part. numerical constant, character constant, string constant.
numeric constant : divided 3 types. integer, Radix number, real number.
character constant : there are only one character based on ASCII code.
string constant : the constant composed many characters.
변수 정리표.PNG

Variables are used based on data type. It is declared to (data type) (variables name);. There are several rules to make variables name.

First, Can use Alphabat, number, under bar.
Second, number and under bar can't be located head of sentence.
Third, can't include space.
Fourth, distinguish the capital and small letters.
Fifth, Can't use the reservation word of C.

The above five are the rule of declaring variables's name. Also, to use the variables, you should do initialize the variables.
Initialize is change trash value of variables to needs. So if you use the variable without initializing, The error that can't do the your processing occur.

--Function--

Function : The group that tie the commands of same flow.
Reason of to need function : Function is very efficient to modify and repitition coding process. because it can use to tie several command.
Declaring and calling of function - reference the picture.
함수 선언 및 호출.png

-한글 원문-
2017년 1월 8일 수업

이번주 월요일에 나는 마이크로소프트 한국지사로 TIPS 2차시 수업을 들으러 갔다. 강사는 Tipssoft의 대표이사 김성엽 이사님 이었다. 대표님은 마이크로소프트 C++프로그래밍 부문 MVP로 활동 하고 계십니다.

이번 수업에서는 변수와 상수부터 함수까지 배웠습니다.
--상수와 변수--
상수 : 프로그램을 실행할 때 값이 결정되어 프로그램이 끝날 때 까지 다른 값으로 바뀌지 않는 정보
변수 : 프로그램내에서 특정 이유나 요인으로 가변 할 수 있는 정보
상수는 크게 아래와 같이 세가지로 구분되어집니다.
숫자형 상수 : 정수, 다른 진수, 실수 세가지로 구분됩니다.
문자형 상수 : 문자 1가지만 들어가게 고 이는 ASCII코드에 기초하게 됩니다.
문자열 상수 : 문자들이 여러 개 들어가서 하나의 열을 이루는 상수를 뜻합니다.
<상수 사진>

번수는 자료형에 기반하여 사용하게 되는데
(자료형) (변수이름); 으로 선언하여 사용합니다. 변수 이름을 정할 때에는 몇가지 규칙(주의 사항)이 있습니다.
첫째, 영문, 숫자, 언더 바 세가지를 사용할 수 있다.
둘째, 숫자와 언더 바는 이름 맨 앞에 올 수 없다.
셋째, 공백을 포함할 수 없다.
넷째, 대,소문자를 구별한다.
다섯째, C언어의 예약어를 사용할 수 없다.
위 다섯 가지가 선언에 대한 규칙입니다. 또한 변수를 사용하기 위해서는 초기화 라는 것을 진행 해야 합니다. 초기화란, 변수 선언시에 들어있던 쓰레기값을 대신하여 필요한 값으로 대입하는 것을 말 합니다. 따라서 초기화를 하지 않고 그냥 사용하게 된다면 원하는 작업을 할 수 없는 등의 문제가 발생합니다.

--함수—
함수 : 정해진 단위 작업을 수행하도록 명령문들을 하나의 그룹으로 묶은 것
함수가 필요한 이유 : 함수는 여러가지의 명령을 하나로 묶어서 사용할 수 있어서 수정 및 반복과정 코딩에서 매우 효율적이다.
함수의 정의와 호출 : 사진참고

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.029
BTC 62797.54
ETH 2442.85
USDT 1.00
SBD 2.68