C-and-Cpp/C2/Increment-And-Decrement-Operators/Khasi

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:01 Ngi pdiang sngewbha iaphi sha ka jinghikai halor ka Increment and Decrement Operators in C and C++.
00:08 Ha kane ka jinghikai, ngin pule shaphang ka:
00:10 Increment bad decrement operators.
00:12 '++' eg. a++ kaba dei ka postfix increment operator.
00:18 ++a kaba dei ka prefix increment operator.
00:22 '--' eg. a-- ka dei ka postfix decrement operator.
00:27 --a ka dei ka prefix decrement operator.
00:31 Ngin pule ruh shaphang ka Typecasting.
00:35 Ban record ha kane ka jinghikai, nga pyndonkam da ka: Ubuntu 11.10 kum ka operating system,
00:40 gcc and g++ Compiler version 4.6.1 in Ubuntu.
00:48 Ka ++ operator ka pynkiew ia u value ba don jong ka operand da i wei.
00:54 a++ and ++a ka iaryngkat bad u a = a + 1.
01:00 Ka -- operator ka pynhiar ia u value ba don jong ka operand da i wei.
01:06 a--bad --a ki iaryngkat bad u a = a - 1.
01:13 Ngan pyni mynta kumno ka jingtreikam jong ka increment bad decrement operators da ka jing iarap jong ka C prokram.
01:19 Nga lah shna lypa ia ka prokram, Te ngan batai ia u code.
01:25 Hangne, ngi lah don u code jong ka increment bad decrement operators hapoh ka C.
01:30 Hangne, nga lah shim ia u integer variable a bad ia u value 1.
01:35 Ha kane ka rukom ngin lah ban khmih bniah ia ka jingkylla ha ka value jong u a.
01:39 Namarkata kan ai ha ngi ia ka jingmut kaba khambha shaphang ka jingtrei kam jong ki operators.
01:47 To ngin peit kumno ka postfix increment operator ka treikam.
01:51 Ka jingmih na kane ka printf statement kalong 1.
01:55 ka value kan ym kylla.
01:57 kane ka long namar ba ka postfix operation ka jia hadien bala evaluate ia ka operand.
02:04 Lada ka operation ka leh pynbiang halor jong ka a++, ka pynbiang ruh ia u value jong u 'a.
02:10 Hadien nangta u value jong u a la incremented.
02:17 Mynta lada ngi peit ia ka value jong u a hangne, lah increment da 1.
02:27 Sa shishien ngin initialize ia u 'a' sha u 1 khnang ba kan reflect halor ka jingkylla.
02:35 Mynta ngin phai biang sha ka prefix increment operators.
02:38 Kane ka printf statement kan print 2 ha ka screen.
02:42 Kane ka long namar ba ka prefix operation ka shait jia ha shuwa ban evaluate ia ka operand.
02:49 Te ka value jong u 'a' nyngkong eh la increment da 1 bad la print ia ka.
02:58 Sa shishien ngin print ia u 's value ban peit yn ym don shuh ki jingkylla.
03:03 Mynta to ngin check dakaba execute ia u code.
03:07 Ngan comment ia kine ki lain. Type /*, */
03:19 Click Save.
03:22 Nga lah save ia ka phail jongnga kum incrdecr.c.
03:29 Plie ia ka terminal window da kaba nion Ctrl, Alt and T keys ha kajuh ka por.
03:35 Ban compile, type ia kine halor jong ka terminal; gcc space incrdecr dot c space minus o space incr. Nion Enter.
03:51 Ban execute ia u code, type ./incr (dot slash incr). Nion enter.
03:59 Ia ka jingmih lah pyni ha ka screen.
04:01 Kane ka long ka jingmih haba phi lah print ia u a++.
04:06 Kane ka long ka jingmih haba phi lah print ia u ++a.
04:09 Ngin iohi ba ka jingmih ka long kumba ngi lah bishar hashuwa.
04:13 Mynta ngin phai biang sha ka prokram kaba sah.
04:16 Mynta ngan batai shaphang ka postfix bad ka prefix decrement operators.
04:21 Pyndam ia kia multi-line comments nangne nangne.
04:29 Mynta sa shisien ngin assign ia ka value jong u 1 sha u a.
04:35 Kane ka printf statement ka pynmih ia ka value jong u 1 kumba lah batai nyngkong.
04:40 a's value yn sa decremented hadien ba ia u a-- la evaluated namar ba ka dei ka postfix expression.
04:47 Ha ka next statement yn print ia u a's value kum u o.
04:51 a's value mynta lah decremented da 1.
04:54 Mynta ngi ioh ia ka prefix decrement operator.
04:58 Ka jingmih na kane ka printf statement kan long 0.
05:00 Namar ba ka dei ka prefix operation.
05:05 Ka prefix operation ka shait jia ha shuwa ban evaluate ia ka operand.
05:09 Ka jingmih na ka printf statement ka long 0.
05:11 Yn ym don jingkylla shuh ia u a's value.
05:15 Type return 0; bad close da u ending curly bracket.
05:21 Click Save.
05:24 Phai biang sha ka terminal.
05:27 Ban compile, type ia kine halor jong ka terminal; gcc space incrdecr dot c space minus o space incr. Nion Enter.
05:42 ban execute, type ./incr. Nion Enter.
05:52 Kane ka long ka jingmih haba print a--.
05:56 Kane ka long ka jingmih haba print --a.
05:59 Te, mynta ngin peit kumno ka increment bad decrement operator ka treikam.
06:05 Lada ngi kwah ban thoh ia ka juh ka prokram ha ka C++,
06:07 Nga lah ban pynkylla katto katne halor jong u C code.
06:10 To ngan phai biang sha ka editor.
06:13 Kane kadei ka C++ phail bad ki code badonkam.
06:16 Peitbniah ba ka header ka iapher na ka C phail header.
06:20 Ngi don ka using namespace statement ruh.
06:24 Khmih ruh ba ka jingmih na ka statement ha ka C++ ka long cout.
06:28 Te, nalor ka jingiapher jong kine , ki artylli ki code ki kham iasyriem.
06:33 Save ia ka phail. Ka phail la save lyngba ka extension .cpp.
06:40 To ngin compile ia u code.
06:42 Plie ia ka terminal bad type g++ space incrdecr dot cpp space minus o space incr. Nion Enter.
07:00 Ban execute, type ./ incr (dot slash incr). Nion Enter.
07:07 Ia ka jingmih la pyni ha ka screen.
07:10 Te, ngi iohi ia ka jingmih ka ialong kumjuh ha ka C program.
07:15 Mynta ngi ioh ia ka concept jong ka typecasting.
07:17 Ha kajuh ka rukom lah implement ia baroh ar ka C bad C++.
07:22 Ia ka Typecasting la juh pyndonkam kum ka wei na ki variable, leh kum ka wei pat ka jait.
07:27 La pyndep ia Typecasting da kaba buh ruh ia ka data type, ba phi kwah, hapoh jong ki
07:33 Ia ka cast la buh hakhmat jong u variable ba phi kwah ban cast.
07:38 Ka typecast ka long valid tang na ka bynta jong kawei ka operation
07:42 Mynta u a' un behave kum ka float variable, naka bynta ka wei ka operation.
07:47 Kane ka long ka nuksa kaba nga lah shna.
07:50 Mynta ngan batai ia u code.
07:54 Nyngkong ngin declare ia ki variables a and b kum ki integers bad c kum ka float.
08:00 a la assigned ia u value jong u 5. b la assigned ia u value jong u 2.
08:06 Ngin leh ia ka operation halor jong u a and b.
08:10 Ngin divide ia u a da u b. Ka jingmih na ka division la buh ha poh ka c.
08:14 Ngi lah pyndonkam ia ka %.2f ban pyni ia ka precision jong 2 decimal places.
08:20 Ka jingmih ba la pyni kan long 2.00 na ka jingkhmih lynti ia ka jingmih jong ka 2.50.
08:25 Ka fractional part lah truncated ha kaba baroh ar ki operands a and b ki dei ki integers.
08:31 Ban leh shisha da ka division, u wei na ki operands un dei u typecast to float.
08:35 Hangne ngi typecasting a to float. c mynta yn bat ia u value kum u real division.
08:41 mynta ka jingmih jong ka real division yn pyni. Ka answer ka long 2.50 kumba khmih lynti.
08:47 Type return 0; bad close u ending curly bracket.
08:51 Click Save. Save the file with .c (dot c) extension.
08:55 Nga lah save ia ka phail jong nga kum typecast.c.
08:59 Plie ia ka terminal.
09:01 Ban compile, type gcc space typecast dot c space minus o space type. Nion Enter.
09:17 Ban execute, type ./type. Nion Enter.
09:25 Ka jingmih yn pyni ha ka screen.
09:27 Haba peit ia ki ar tylli ki value ngi iohi ia kaba mih jong ka typecasting.
09:32 Mynta ngin batai lyngkot ia ka jinghikai.
09:34 Ha kane ka jinghikai ngi la pule-
09:36 Kumno ban pyndonkam ia ka increment bad decrement operators,
09:40 Ngi lah pule shaphang ki forms, Postfix and Prefix,
09:44 Bad ruh ngi lah pule shaphang ka typecasting bad kumno lah pyndonkam.
09:47 Kum ka assignment:
09:49 thoh ia ka program ban solve ia kine ki expression, a divided by b plus c divided by d.
09:56 Ki values jong u a, b, c bad d la shim kum ka input na u user.
10:01 Pyndonkam da ka typecasting ban perform real division.
10:05 Peit ia ka video ba la ai ha ka link harum.
10:08 Kan batai lyngkot shaphang ka Spoken Tutorial project.
10:10 Lada phim don ia ka bandwidth ba biang, phi lah ban download bad peit pat ia ka.
10:15 Ka Spoken Tutorial project team:
10:17 Ka pynlong ia ki jinghikai da kaba pyndonkam da ki spoken tutorials.
10:20 Yn ai syrnod ia kiba pass online test.
10:24 Na bynta ka jingtip ba kham bniah, sngewbha thoh sha ka: contact@spoken-tutorial.org
10:33 Spoken Tutorial project ka dei ka bynta jong ka Talk to a Teacher project.
10:37 La kyrshan ia kane ka project da ka National Mission on Education lyngba ka ICT, MHRD, jong ka sorkar India.
10:44 Shuh shuh ki jingtip halor kane ka mission phin ioh na kane ka link ba la ai harum:

http://spoken-tutorial.org\NMEICT-Intro

10:55 La pynkylla sha ka ktien khasi da i Godwin pyrbot bad nga i John Nongkynrih.

Khublei naka bynta ba iasnohlang.

Contributors and Content Editors

John123