01.03.2013 Views

g. surgulaZe, g. janeliZe, i. xuciSvili

g. surgulaZe, g. janeliZe, i. xuciSvili

g. surgulaZe, g. janeliZe, i. xuciSvili

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

mzimiT gamoiyofa gamosaxulebebi, xolo operaciis Sedegi iqneba<br />

bolo gamosaxulebis mniSvneloba. magaliTad, Semdegi programis<br />

#include<br />

main()<br />

{<br />

int x=3, y=7;<br />

x++, x+=y, x*=y;<br />

printf("x=%d",x);<br />

return 0;<br />

}<br />

Sedegia: x=77.<br />

vnaxoT, rogor miiReba es Sedegi: pirvelad x++-is Sesruleba x-s<br />

mianiWebs mniSvnelobas 4, Semdeg gamoiTvleba x+=y gamosaxuleba da x<br />

gaxdeba 4+7=11-is toli, bolos ki Sesruldeba x*=y da miiReba<br />

mniSvneloba 11*7=77.<br />

operacia sizeof<br />

am operacias aqvs 2 formati: sizeof(tipi) da sizeof(gamosaxuleba).<br />

pirvel SemTxvevaSi operacia daabrunebs mrgval frCxilebSi<br />

mocemuli tipisTvis mexsierebaSi gamoyofili baitebis raodenobas.<br />

xolo sizeof(gamosaxuleba) formatSi dgindeba moyvanili<br />

gamosaxulebis tipi (gamosaxuleba ar gamoiTvleba) da gamoimuSaveba<br />

am tipisTvis gamoyofili mexsierebis zoma baitebSi. magaliTad:<br />

#include<br />

main()<br />

{<br />

long x=12, y=8; double z;<br />

printf("%d %d",sizeof(short int),sizeof (x+y));<br />

printf("\n%d", sizeof(x+z));<br />

return 0;<br />

}<br />

32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!