Advance-C/C2/Storage-class-specifiers/Khasi

From Script | Spoken-Tutorial
Jump to: navigation, search
Time
Narration
00:01 Ngi pdiangsngewbha iaphi sha ka Spoken Tutorial halor ka Storage class specifiers.
00:07 Ha kane ka jinghikai, ngin pule shaphang ka:Storage class specifiers, auto keyword, static keyword , extern keyword, “register”keyword, da ka jingiarap jong ki nuksa.
00:22 Na ka bynta kane ka jinghikai(tutorial), Nga pyndonkam da ka:\ Ubuntu Operating system” “version 11.10” bad ka, gcc Compiler” “Version 4.6.1” ha ka Ubuntu.
00:34 Ban bud ia kane ka jinghikai(tutorial), phi dei ban don ki jingtip shaphang ki jinghikai “C”
00:41 Lada em, ia ki jinghikai(tutorial) kiba iadei, sngewbha leit sha ka website jongngi kumba la pyni.
00:47 Ngan sdang da ka jingpynithuh sha ka storage class specifiers.
00:52 Ka Specifiers ka ong ia ka compiler- *haei ban buh ia ka variable
00:57 Kumno ban buh ne store ia ki variable.
00:59 Kaei ka value basdang jong u variable
01:03 Ka jingjrong ka por jong u variable.
01:06 Ka syntax ka dei ka  : storage_specifier data_type variable _name.
01:13 Ki jait jong ki storage specifiers ki dei:

auto static extern register .

01:21 To ngin sdang da ka “Auto” keyword.
01:24 auto keyword ka pynbna ia ka automatic variable.
01:28 Ka don ia ka “local” scope.
01:30 Keywords kim sdang hi dalade.
01:34 Phi dei ban pynshai ia ka jingsdang jong ka keywords haba phi pynbna ne declare ia ka.
01:39 Ka jaka buh ia ka keywords ka dei ka CPU memory.
01:43 To ngin peit ia ki nuksa. Nga don ia u code phail; to ngin ia peit ia u .
01:49 Kynmaw ba ka kyrteng jong ka file jongngi ka dei auto.c.
01:54 Ngi la declare ia ka function kum “increment()”.
01:58 Kane ka dei ka main() function.
02:00 Ha ka main() function, increment() function la khot 4 sien.
02:06 Te ngi ioh ia ka return 0 statement.
02:10 To ngin peit ia ka jingbatai jong ka function.
02:14 Hangne, ngi la rai ne declare ia u variable 'i' kum ka auto int. Ka don ia ka local scope.
02:21 Nangta ngi pyni ia ka value jong u 'i' da kaba pyndonkam ia ka printf.
02:26 Ka value jong u 'i' hangne la pynkiew.
02:30 To ngin plie ia ka terminal da kaba nion Ctrl+Alt+T keys ha kajuh ka por na ka keyboard jongphi.
02:38 Type: gcc space auto.c space hyphen o space auto. nion Enter.
02:48 Type: dot slash auto
02:51 Ka jingmih ka dei zero.
02:54 Mynta phai biang sha ka prokram jong ngi.
02:57 To ngin initialize ia ka auto variable i halor jong ka main() function.
03:02 Ngan cut ia kine kiba ngi la declare bad ka jingsdang nangne bad paste ia ki hangne.

Click ha ka Save.

03:14 To ngin execute ia ka terminal. Nion ia u up-arrow key arsien.

Nion Enter.

03:22 Ngin iohi ia ka error: "file-scope declaration of 'i' specifies 'auto'".
03:29 Kane ka dei namar ba ka auto variable kadei ka local jong ka function.
03:34 Ngim lah ban initialize ia ka salonsar (globally).
03:37 To ngin pynbeit ia ki jingbakla. Ngin phai biang sha ka prokram jongngi.
03:42 Pyndam noh iakane; paste ia ka hangne.
03:47 Click ha ka Save bad execute ha ka terminal.
03:52 Nion ia u up-arrow key. Phai biang sha ka command ba hashuwa.
03:57 Nion Enter. Type: dot slash auto. Nion Enter.
04:03 Hooid, ka la long! Ka jingmih ne output ka dei zero.
04:07 Kane ka dei namar ba ngi la sdang ia ka value jong u ‘i’da u zero.
04:13 Mynta, to ngin peit ia ka static variable.
04:16 Watla ngi la dep pule shaphang ka static variable, ha ki jinghikai ba la dep, Ngan batai lyngkot biang ia ka hangne.
04:24 'static' variables ki sdang da u zero.
04:28 Kin ym jah wat hadien ba la khang ia ka program control na ka block.
04:35 Ka Value jong u variable ka iaineh ne don hapdeng kifunction calls kiba pher.
04:41 Ka jaka buh ka dei ka CPU memory.
04:45 To ngin peit ia ki nuksa. Ngan pynbeit da u juh u code file.
04:51 Phai biang sha ka prokram jong ngi.
04:54 Nion Ctrl + Shift + S key ha kajuh ka por.
05:01 Mynta, Ngan shu pynkylla ia ka kyrteng ka phail sha ka static. Click ha ka Save.
05:10 Mynta, Ngan pynkylla ia ka jingsdang jong u variable 'i' sha ka static int i equal to zero

Click ha ka Save.

05:23 To ngin peit ka jia aiu. Execute ia ka phail ha ka terminal.
05:30 Type: gcc space static.c space hyphen o space stat. Nion Enter.
05:41 Type: dot slash stat. Nion Enter.
05:46 Ka jingmih ka long kumne: "0, 1, 2, 3"
05:51 Kane ka long namar ba ka static variables ki dei ki global variables.
05:56 Ka scope jong ka static variable dei ka local sha ka function, kiba la dep batai.
06:03 Kin ym duh ia ki value jong hapdeng ki function calls.
06:08 Mynta, to ngin pule shaphang ka extern keyword.
06:12 Ka Scope jong ka extern variable ka dei ha baroh shilynter jong ka main prokram.
06:17 Ka jing batai naka bynta ka extern variable ka lah ban don hangno hangno ha ka 'C' prokram.
06:23 extern variables ki ia sdang da u zero, da ka default.
06:28 Lah ban access ia ki ia da baroh ki functions ha ka program.
06:33 Ia kine la buh ha ka CPU memory.
06:36 To ngin peit lyngba ki nuksa.
06:38 Nga don ia ka code phail; To ngin peit ia ka.
06:42 Kynmaw ba ka kyrteng jong ka phail jong ngi ka dei "extern.c".
06:47 Nga la sdang ia u variable kum integer variable 'x' sha u 10.
06:54 Kane kadei ka main() function. Ha ka main() function, nga la declare ia u extern integer variable y.
07:03 Da ka ba pyndonkam da ka printf statements, ngin pyni ia ka value jong u 'x' bad 'y'.

Kane ka dei ka return statement.

07:12 Ngi ngin sdang ia u 'y' sha u 50 hadien ba la khang ia ka main() function.
07:18 Mynta, phai sha ka terminal bad to ngin peit kaei kan dei ka output ne jingmih.
07:24 Type: gcc space extern.c space hyphen o space ext. Nion Enter.
07:35 Type: dot slash ext. Nion Enter.
07:40 Ka output ne jingmih la pyni kum:

“The value of x is 10” “The value of y is 50”

07:48 Kumba ngi la pule, ka value jong ka extern keyword ka dei baroh shilynter jong ka main program.
07:55 Ngi lah ban batai ia ka ha kano kano ka bynta jong program.
07:59 Baroh ki ar statement ki long kiba la biang.
08:02 Mynta, to ngin leit pat sha ka register keyword.
08:06 ki register variables yn sa access kham kloi ban ia ki normal variables.
08:13 La buh ia ki hapoh ka register memory ban ia ka ba buh ha ka main memory.
08:19 Tang khyndiat eh ki jingbun jong ki variable lah ban pyndonkam namar ka register size ka dei duna palat.
08:25 16 bits, 32 bits lane 64 bits.
08:30 To ngin peit ia ka nuksa mynta. Nga don ia ka code phail. To ngin peit ia ka.
08:37 Kynmaw ba ka kyrteng ka phail ka dei "register.c".
08:42 Hangne, ngi la declare ia u register integer variable.
08:47 Une u variable yn sa buh beit beit ha ka register memory.
08:53 Kane ka dei ka 'for' loop kaba pyni ia ka value jong u 'i' naduh 1 haduh 5.
08:59 Kane kan pyni ia ka value jong u 'i'.
09:03 To ngin execute ia ka program bad peit.
09:07 Ha ka terminal, type: gcc space register.c space hyphen o space register
09:17 Nion Enter. Type: dot slash register. Nion Enter.
09:25 Phi lah ban iohi, ka output ne jingmih la pyni kum: "Values stored in register memory 1 2 3 4 5".
09:34 Da kane ngi lah poi sha ka bakut jong ka jinghikai. To ngin ia batai lyngkot.
09:39 Ha kane ka tutorial, ngi la pule shaphang ka-

Storage class specifiers auto keyword static keyword extern keyword register keyword.

09:52 Kum ka assignment, thoh ia ka program ban print ia ka sum ne kheinlang jong ki 5tylli ki nombar banyngkong.
09:59 Declare baroh ar ki keywords auto bad static ha ka program.
10:04 Peit ia ka video ba don ha ka link ba pyni harum.
10:07 Ka batai kyllum ia ka Spoken Tutorial project.
10:11 Lada phim don ia ka bandwidth ba biang, phi lah ban download bad peit pat ia ka.
10:16 Ka Spoken Tutorial project team: * Ka pynlong ia ki workshop da kaba pyndonkam da ki spoken tutorials.
10:22 Ka ai certificate sha kito kiba pass ha ka online test.

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:38 La kyrshan ia kane ka project da ka National Mission on Education lyngba ICT, MHRD, jong ka sorkar India.
10:45 Kambun ki jingtip halor kane ka mission ki don ha kane ka link ba la ai harum:

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

10:52 La pynkylla sha ka ktien khasi da i Godwin pyrbot.Khublei naka bynta ba iasnohlang.

Contributors and Content Editors

Pratik kamble, Winz