Daprogramebis safuZvlebi leqcia #2 2009-2010 sasw.w. I semestri Tsu asoc. prof. naTela arCvaZe Tsu asoc. prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.

Презентация:



Advertisements
Похожие презентации
Daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc. prof. naTela arCvaZe Tsu asoc. prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.
Advertisements

Daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc. prof. naTela arCvaZe Tsu asoc. prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.
Daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc.prof. naTela arCvaZe Tsu asoc.prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo.
Virtual memory Linux. Ներածություն Kernel and user space work with virtual addresses (also called linear addresses) that are mapped to physical addresses.
1. a=? b=? c=? {int a, b, c; a=(b=2+3)/2 - 4+(c=5%2); printf("%d %d %d \n", a, b, c); }
1. a=? b=? c=? {int a, b, c; a=(b=2+3)/2 - 4+(c=5%2); printf("%d %d %d \n", a, b, c); }
Basic Input - Output. Output functions printf() – is a library function that displays information on-screen. The statement can display a simple text message.
Об отладке программ МО ВВС ИВМ и МГ СО РАН Городничев Максим Александрович.
Data Types in C. A Data Type A data type is –A set of values AND –A set of operations on those values A data type is used to –Identify the type of a variable.
Практическое использование Java Макаревич Л. Г.. Инсталляция Java Документация в docs Прописать PATH (каталог bin в JSDK) Прописать CLASSPATH (путь к.
Java Java java ISS, Wuhan University Nov., Java Java java Java Java Java ……
© Luxoft Training 2013 Annotations. © Luxoft Training 2013 Java reflection / RTTI // given the name of a class, get a "Class" object that // has all info.
Test 6 Вопрос 1. Как можно уничтожить объект в Java? a)присвоить null всем ссылкам на объект b)вызвать Runtime.getRuntime().gc() c)вызвать метод finalize()
Синтаксис языка Java. Символы и синтаксис Перевод строчки эквивалентен пробелу Регистр в именах различается.
Object-Oriented Programming Ramzi Saifan Program Control Slides adapted from Steven Roehrig.
Лекция 2Лекция 2Структура программы Директивы препроцессора main () { Описания переменных Операторы }
© 2004 Cisco Systems, Inc. All rights reserved. ARCH v Module Summary Maintaining a high level of network security requires a continuous effort.
Введение в JAVA. Java Java – язык программирования: объектно-ориентированный кроссплатформенный строго-типизированный.
ABL5 - Troubleshooting 1 RED SYSTEM. ABL5 - Troubleshooting 2 RED SYSTEM System Status RecordsCal Status Operators Manual, Chapter 8 Troubleshooting Tools.
BUSINESS LETTER TRUE OR FALSE TEST. Are the following statements True or False? TRUE FALSE.
Транксрипт:

daprogramebis safuZvlebi leqcia # sasw.w. I semestri Tsu asoc. prof. naTela arCvaZe Tsu asoc. prof. naTela arCvaZe Tsu, zusti da sabunebismetyvelo mecnierebaTa fakulteti, kompiuterul mecnierebaTa mimarTuleba

1. wina leqciaze Sesavali daprogramebis ena C-Si stili programis daweris wesebi: programa dayaviT calkeul procedurebad da SeamcireT sirTulis xarisxi grZel instruqciebs Tavi aarideT- programa ase ufro advili aRsaqmeli iqneba ecadeT Tqveni programa iyos rac SeiZleba martivi da naTeli

Tema: ZiriTadi ganacxadebi da gamosaxulebebi

programis ZiriTadi struqtura /************************************* *... sawyisi komentarebi... * *************************************/... ganacxadebi monacemebze... int main () {... Sesrulebadi Setyobinebebi... return (0); }

magaliTi hello.cpp. /********************************************* * hello -- program to print out "Hello World" * * Not an especially earth-shattering program. * * * Author: Steve Oualline. * * * Purpose: Demonstration of a simple program. * * * Usage: * Runs the program and the message appears. * **********************************************/ #include int main() { /* Tell the world hello */ printf( " Hello World\n " ); system ( PAUSE ); return (0); }

gamosaxulebebi martivi operatorebi: +, _, *, /, % ( naSTi mT. gayofisas miR.) /* Sedegi ar aqvs */ int main() { ( ) * 3; return (0); }

cvladebis saxelebi gamoiyeneba asoebi, cifrebi da qveda tires simbolo ( _ ) saxeli ar SeiZleba cifriT iwyebodes sworea: sashualo, Pi, studentebis_raodenoba, gio, Gio,GIO arasworea: 2_cda, fasi$, studentebis raodenoba, int, for

ganacxadi cvladebze mTeli ricxvebi tipi saxeli; /* komentari */ int saxeli; /* komentari */ 32 biti (4 baiti) (-2 31 )-dan ( )-mde 16 bits (2 baits), (-2 15 )-dan 32767( )-mde. limits.h - mudmivebi, romelTa mniSvnelobebiaA sxvadasxva diapazonis sazRvrebi (mag., INT_MAX, INT_MIN)

miniWebis Setyobineba cvladi = gamosaxuleba;

funqcia printf printf ( formati, gamos1, gamos2,... ); #include int term; /* term gamoiyeneba or gam. */ int main() { term = 3 * 5; printf ("gaormagebuli %d aris %d \n", term, 2 * term); printf ("gasammagebuli %d aris %d \n", term, 3 * term); system ("PAUSE"); return (0); }

namdvili ricxvebi float cvladi; /* komentari */ = = / 10 = / 10.0 = 1.9

magaliTi int i; /* mTeli tipis cvladi saxeliT i */ float x; /* mcocavwertiliani cvladi saxeliT x */ main() { x = 1.0/2.0; /* mianiWebs cvlad x -s mniS. 0.5 */ i= 1/3; /* mianiWebs cvlad i- s mniS. 0 */ x = (1/2)+(1/2); /* mianiWebs cvlads x -s mniSv. 0 */ x = 3.0/2.0; /* mianiWebs cvlad x -s mniS. 1.5 */ i = x; /* mianiWebs cvlad i- s mniS. 1 */ return (0); }

simboloebi char cvladi; /* komentari */ mmarTveli simboloebi: \b \f \n \r \t \ \a

magaliTi #include char char1; /* pirveli simbolo */ char char2; /* meore simbolo */ char char3; /* mesame simbolo */ int main() { char1='A'; char2='B'; char3='C'; printf("%c%c%c gardaiqmneba %c%c%c-ad\n", char1,char2,char3,char3,char2,char1); system (PAUSE); return(0); } pasuxi: ABC gardaiqmneba CBA -ad.