C-and-Cpp/C3/Strings/Khasi

From Script | Spoken-Tutorial
Revision as of 21:00, 17 October 2017 by John123 (Talk | contribs)

Jump to: navigation, search
Time Narration
00:01 Ngi pdiangsngewbha ia phi sha ka Spoken Tutorial halor ka Strings ha ka C and C++.
00:06 Ha kane ka jinghikai ngin pule:
00:08 Kaei ka string.
00:10 Declaration jong ka string.
00:13 Initialization jong ka string.
00:15 Katto katne ki nuksa jong ka string'.
00:17 Ngin peit ruh katto katne ki jingbakla bad ki solutions.
00:22 Ban record ia ka jinghikai, Nga pyndonkam
00:25 Ubuntu Operating System version 11.04,
00:29 gcc and g++ Compiler version 4.6.1 .
00:35 To ngin sdang da ka jinglamphrang halor ka strings.
00:38 String ka dei ka jingbuh jong ki character ha kaba la leh kum ia ki single data item.
00:44 Ka Size jong ka string = length of string + 1.
00:49 To ngan iathuh iaphi kumno ban declare ia ka string.
00:52 Ka syntax jong kane ka long
00:55 char, kyrteng jong ka string bad size.
00:59 char ka dei ka jait data, kyrteng jong ka string dei ka kyrteng jong ka string, bad ng lah ban pynheh hangne.
01:06 Eg: Hangne ngi lah declare ia ka character string names da ka size 10.
01:13 Mynta ngin peit lyngba ki nuksa.
01:15 Nga lah type ia ka prokram, ngan plie ia ka.
01:19 Kynmaw ba ka kyrteng jong ka phail jong ngi ka long string.c
01:23 Ha kane ka prokram, ngin shim ia ka string kum ka input na u nongpyndonkam bad print ia ka.
01:29 To ngan batai ia ka code mynta.
01:32 kine ki long ki header phail jong ngi.
01:34 Hangne string.h ka kynthup ia ka declarations, functions, constants jong ka string handling utilities.
01:43 Haba ngi trei halor ka string functions, ngi dei ban kynthup ia kane ka header phail.
01:47 Kane ka dei ka main() function jong ngi.
01:49 hangnce ngi la declare ia ka string strname da ka size 30.
01:55 Hangne ngin pdiang ia ka string na u nong pyndonkam.
01:58 Ban pule ia ka string, ngi lah ban pyndonkam da ka scanf() function da ka format specifier %s.
02:05 Ngin pyndonkam ia ka caret sign and \n ban kynthup ia kaba thylli da ka string.
02:11 Nangta ngin print iaka string.
02:13 Bad kane ka dei ka return statement jongngi.
02:16 Mynta click Save.
02:18 To ngin execute ia ka program.
02:20 Sngewbha plie ia ka terminal window da kaba nion ia u Ctrl, Alt and T keys ha ka juh ka por na keyboard jong phi.
02:30 Ban compile, type gcc space string.c space -o space str
02:37 Bad nion Enter .
02:40 Ban execute, type ./str (dot slash str).
02:43 Mynta nion Enter.
02:46 Hangne la pyni ia ka kum Enter the string .
02:49 Ngan type "Talk To A Teacher".
02:56 Mynta nion Enter.
02:58 Ka output la pyni kum The string is Talk To A Teacher.
03:03 Mynta to ngin switch biang sha ki slides jongngi.
03:06 Haduh mynta ngi iakren shaphang ka declaration jong ka string.
03:10 Mynta ngin ia discuss kumno ban initialize ia ka string.
03:13 Ka syntax jong kane ka long,
03:16 char var_name[size] = “string”;
03:20 Eg: Hangne ngi lah declare ia ka character string “names” da ka size 10 bad ka string ka long “Priya”"
03:28 Sa kawei ka syntax kalong,
03:31 char var_name[ ] = {'S', 't', 'r', 'i', 'n', 'g'} hapoh jong ki single quotes.
03:36 eg: char names[10] = {'P', 'r', 'i', 'y', 'a'} ha ki single quotes.
03:42 To ngan pyni iaphi kumno ban pyndonkam nyngkong ia ka syntax lyngba ki nuksa.
03:48 Switch biang sha ka editor jong ngi. Ngin pyndonkam da kijuh ki nuksa.
03:52 Nyngkong, nion shift, ctrl bad s keys ha kajuh ka por na ka keyboard jong phi.
03:58 Mynta save ia ka phail da ka kyrteng stringinitialize.
04:03 Mynta click Save.
04:06 Ngin ia initialize ia ka string.
04:08 Namarkata, ha ka 5th lain, type
04:11 = and within the double quotes “Spoken-Tutorial”;
04:20 Mynta, click Save .
04:22 Mynta weng noh ia kine ki ar tylli ki lain, ha kaba ngin print tang ia ka string.
04:27 Click Save.
04:30 To ngin execute. Phai biang sha ka terminal. Jong ngi.
04:33 Ban compile, type
04:35 gcc space stringinitialize.c space -o space str2
04:44 Hangne ngi don str2 namar ba ngim kwah ban overwrite ia ka output parameter str na kabynta ka phail string.c.
04:54 Mynta nion Enter.
04:56 Ban execute, type ./str2
05:00 Ia ka output la pyni kum "The string is Spoken-Tutorial".
05:06 Mynta ngin peit katto katne ki jingbakla ba juh jia.
05:09 Phai biang sha ka prokram jong ngi.
05:11 Tharai, hangne ngi type ia ka spelling jong ka string kum sting.
05:16 Mynta click Save.
05:18 To ngin execute. Phai biang sha ka terminal jong ngi.
05:21 Mynta compile kumba hashuwa.
05:23 Ngi iohi ia ka fatal error.
05:25 sting.h: No such file or directory
05:28 compilation terminated.
05:30 Phai biang sha ka prokram jong ngi.
05:32 Kane ka long namar ba ka compiler kam lah ban wad ia ka header phail kaba kyrteng sting.h .
05:39 Namarkata ka ai ia ka error.
05:41 To ngin pynbeit ia ka error.
05:43 Type r hangne.
05:45 Mynta click Save. To ngin execute biang.
05:47 Phai biang sha ka terminal. jong ngi.
05:50 Compile kumba ha shwa, execute kumba ha shwa.
05:54 Hooid, ka la treikam!
05:56 Mynta, to ngin peit sa kawei pat ka jingbakla ba juh jia.
05:59 Phai biang sha ka prokram jong ngi.
06:02 Tharai, hangne ngan type int ha ka jaka jong char.
06:06 Mynta, click Save . To ngin peit jia aiu.
06:09 Phai biang sha ka terminal jong ngi.


06:11 To ngan pyndam ia ka prompt.
06:15 Compile kumba ha shwa
06:17 Ngi iohi ia ka jingbakla.
06:19 Wide character array initialized from non-wide string .
06:24 format %s expects argument of type 'char' but argument 2 has type 'int' .
06:32 Phai biang sha ka prokram jong ngi.
06:36 kane ka long namar ngi pyndonkam  %s kum ka format specifier jong ka string.
06:42 bad ngi initialize ia ka da u integer data type.
06:47 To ngin pynbeit ia ka jingbakla.
06:49 Type char hangne.
06:51 Click Save.
06:53 To ngin execute. Phai biang sha ka terminal. Jong ngi.
06:56 Compile kumba hashuwa, execute kumba ha shuwa.
07:00 Hooid, ka la trei kam!
07:03 Mynta ngin peit kumno ban execute ia ka juh ka prokram ha ka C++.
07:08 Phai biang sha ka prokram jong ngi.
07:11 To ngan plie ia ka phail string.c jong ngi.
07:15 Ngin pynbeit ia ka code hangne.
07:18 Nyngkong, nion shift, ctrl bad S keys ha kajuh ka por na ka keyboard jong phi.
07:25 Mynta save ia ka phail da ka extension .cpp (dot cpp).
07:29 bad click Save.
07:33 mynta ngin pynkylla ia ka header phail kum iostream.
07:38 Kynthup ia ka using statement.
07:43 Mynta click Save.
07:47 Mynta ngin pyndam ia kane ka declaration.
07:50 bad declare ka string variable.
07:53 Type string space strname bad u semicolon.
07:59 Click Save.
08:02 Bujli ia ka printf statement da ka cout statement.
08:07 Pyndam ia ki closing bracket hangne.
08:11 Pyndap ia ka scanf statement bad type getline opening bracket closing bracket, hapoh jong ki brackets type (cin, strname) .
08:24 Ha ka ba khatduh, type a semicolon.
08:28 Mynta sa shisien, bujli ia ka printf statement da ka cout statement.
08:36 Pyndam ia ka format specifier bad \n .
08:40 Mynta pyndam ia u comma.
08:42 Type ar tylli ki angle brackets, Pyndam ia u bracket hangne.
08:49 Type ar tylli ki angle brackets bad hapoh jong ki double quotes type \n .
08:54 bad click Save.
08:58 Hangne ngi lah declared ia ka string variable 'strname' .
09:03 Namar ngi khlem pyndonkam ia ka format specifier in C++, ka compiler ka dei ban tip ba 'strname' ka dei ka string variable.
09:13 Hangne ngi pyndonkam getline ban extract ia ki characters na ka input sequence.
09:18 Ka buh iaki ha kum ka string.
09:22 Mynta to ngin execute ia ka program. Phai biang sha ka terminal jongngi.
09:27 To ngan pyndam noh ia ka prompt.
09:30 ban compile, type
09:32 g++ space string.cpp space -o space str3
09:39 bad nion Enter.
09:41 Ban execute, type ./str3 (dot slash str3).
09:46 Nion Enter. kan pyni kum Enter the string.
09:50 Ngan enter kum Talk To A Teacher .
09:55 Mynta nion Enter.
09:57 Ka output la pyni kum
09:59 "The string is Talk To A Teacher"
10:03 Ngin iohi ba ka output ka ia sryiem ia ka C code jong ngi.
10:07 Mynta ngin phai biang sha ka slide jong ngi. To ngin batai lyngkot.
10:11 Ha kane ka jinghikai ngi la pule:
10:13 Strings
10:14 Declaration of a string
10:16 eg: char strname[30]
10:20 Initialization jong u string eg: char strname[30] = “Talk To A Teacher”
10:26 Kum ka assignment,
10:28 Thoh ia ka prokram ban prin ia ka string da kaba pyndonkam ia ka 2nd syntax.
10:34 Peit ia ka video ba la ai ha ryngkat ka link ha trai.
10:37 Ka batai lyngkot ia ka Spoken Tutorial Project.


10:40 Lada phim don ka bor internet ba khlain, shu download sa peit pat hadien.
10:44 Ka Spoken Tutorial Project Team:
10:46 ka pynlong ki workshop da ba pyndonkam ia ki spoken tutorials.
10:49 Yn ai syrnod ia kiba pass ia ka online test.
10:54 Na bynta ka jingtip ba kham bniah, sngewbha thoh sha ka 'contact@spoken-tutorial.org
11:01 Spoken Tutorial” Project ka dei ka bynta jong ka Talk to a Teacher.
11:04 La kyrshan ia kane ka project da ka National Mission on Education lyngba ICT, MHRD, jong ka sorkar India.
11:12 Shuh shuh ki jingtip halor kane ka mission phin ioh na kane ka link ba la ai harum :

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

11:16 La pynkylla sha ka ktien khasi da i Godwin pyrbot bad nga i John Nongkynrih.
11:20 Khublei naka bynta ba iasnohlang

Contributors and Content Editors

John123