Advance-C/C2/Union-and-Typedef/Khasi
From Script | Spoken-Tutorial
Revision as of 10:49, 26 April 2017 by PoojaMoolya (Talk | contribs)
|
|
---|---|
00:01 | NGI PDIANG sngewbha IA PHI SHA KA “Spoken tutorial” halor KA Typedef and Union in C. |
00:07 | HA KANE KA JINGHIKAI, NGIN ia PULE SHAPHANG:
'typedef' keyword, 'union' keyword Rungkat ki nuksa. |
00:17 | Na ka bynta kane ka jinghikai, Ngan pyndonkam da ka:
Ubuntu Operating System version 11.10. gcc compiler version 4.6.1 on Ubuntu. |
00:29 | Ban sngewthuh ia kane ka jinghikai, phi hap ban nang ia ka jinghikai“C”. |
00:36 | Lada ym dei, ia ka jinghikai ba iasyriem, sngwebha ban leit sha ka website jong ngi kumba la pyni. |
00:43 | Ngan sdang da ka jinglam phrang jong ka typedef keyword. |
00:49 | Typedef keyword la pyndonkam ha kaba buh ia ki kyrteng jong ki symbol sha ki type lane user-defined datatypesba la don lypa. |
00:58 | Ka dei ka rukom ban batai shaphang ka alias sha ka command. |
01:03 | Ka iarap ban batai shai sha u code. |
01:07 | Ka iarap ban sngewthuh khambha ia u code bad pynkylla. |
01:12 | Syntax: typedef existing_name alias_name. Nuksa: typedef unsigned int uint; |
01:24 | To ngin peit ia ki nuksa jong u code. |
01:28 | Kynmaw ba ka kyrteng jong ka phail ka long "pallindrome.c". |
01:34 | Ha kane ka program, ngin check la u number ba la ai u long palindrome ne em. |
01:41 | Ngi lah buh ka kyrteng alias kum ka 'uint' sha ka unsigned int datatype , da kaba pyndonkam da ka typedef keyword. |
01:52 | Hangne ngi pyndonkam da 'uint' ban declare ia ka variables. |
01:59 | Kane ka dei ka logic jong ka palindrome. |
02:03 | Mynta, To ngin execute ia ka program. |
02:06 | Plie ia ka terminal da kaba nion Ctrl+Alt+T keys ha kajuh ka por na ka keyboard. |
02:16 | Type: gcc space pallindrome dot c space hyphen o space pallindrome. Nion Enter. |
02:29 | Type: dot slash pallindrome |
02:34 | Ngin iohi: "Enter any three digit number:". |
02:38 | Ngan pynrung 121. |
02:42 | Ka jingmih kalong: "Given number is a palindrome number". |
02:47 | Mynta ngin pule shaphang ka union datatype. |
02:52 | union ka dei ka jinglum lang jong ki ba bunjait ki datatypes ba la buhlang. |
02:57 | union ka sam ia kawei ka common storage-space naka bynta ki pait jong ka baroh. |
03:03 | ngi lah ban treikam tang u wei u paid(member) jong ka unionha kajuh ka por . |
03:08 | Syntax1:
union union_name hapoh jong ki curly bracket members; hadien jong ki curly brackets union_variableBad u semicolon. |
03:21 | Ngi ioh ruh ia kawei pat ka syntax.
Syntax 2:union union_name hapoh jong ki curly bracket members; hadien ki curly bracket semicolon union union_name union_variable; |
03:39 | To ngin peit da ka nuksa. |
03:41 | Nga don u code file; to ngin peit ia u. |
03:47 | Kynmaw ba ka kyrteng jong ka phail jong ngi ka long union dot c. |
03:52 | Ngi lah rai ia ka kyrteng ka union ka dei "student". |
03:56 | Hangne, ngi don lai tylli ki variables- english, maths bad science. |
04:02 | Ha ka main() function, ngi la rai ia ka union variable da ka stud. |
04:09 | Hangne ngin lah ban rung sha ka union member da kaba pyndonkam ka union variable:
stud dot english, stud dot maths, stud dot science |
04:21 | Nangta ngin niew ia ki marks bad pyni ia ka. |
04:26 | To ngin execute ha ka terminal. Type: gcc space union dot c space hyphen o space union Type: dot slash union |
04:44 | Ka jingmih ka long: "Total is 228". |
04:50 | To ngin peit ia ka jingiapher hapdeng ka structure bad union. |
04:55 | union ka sam ia ka common storage-space na ka bynta baroh ki member ne paid jong ka. |
05:01 | 'structure' ka sam laka jong ka storage-space n aka bynta baroh ki member jong ka. |
05:07 | 'union' ka shim duna ia ka memory space. |
05:11 | 'structure' ka shim khambun ia ka memory space ne jaka. |
05:14 | Nuksa jong ka union:
union student{int marks;char name[6];double average;}; |
05:27 | Memory allocation na ka bynta ka union variable kan long 8 bytes kum ka double datatype kan shim bun ia kamemory space. |
05:39 | Nuksa jong ka structure:struct student{int mark;char name[6];double average;}; |
05:48 | Memory allocation n aka bynta ka structure variable kan long: 2bytes+6bytes+8bytes =16bytes. |
06:00 | Mynta ngi la poi sha ba kut jong kane ka jinghikai. |
06:04 | To ngin ia batai lyngkot. |
06:06 | Ha kane ka jinghikai, ngi la nang ia ki:
typedef , union bad jingiapher hapdeng ka union bad structure. |
06:14 | Kum ka assignment ne jingaibynta, |
06:17 | thoh ia ka program ban pyni ia ki kam jong u nongtrei |
06:21 | kum name, address, salary. |
06:25 | Batai ia ka union ba kyrteng employee. |
06:29 | Ai ia ka kyrteng jong ka alias kum "emp" da kaba pyndonkam dakatypedef. |
06:35 | Peit ia ka video ba la ai ha ka link harum.. |
06:39 | Kan batai lyngkot shaphang ka Spoken Tutorial project. |
06:42 | Lada phim don ia ka bandwidth ba biang, phi lah ban download bad peit pat ia ka. |
06:47 | Ka Spoken Tutorial project team: * ka pynlong ia ki jinghkai da kaba pyndonkam da ki spoken tutorials. |
06:53 | ka ai certificate ia kito kiba pass online test.
Na bynta ka jingtip ba kham bniah, sngewbha thoh sha ka : contact@spoken-tutorial.org |
07:04 | Spoken Tutorial project ka dei ka bynta jong ka Talk to a Teacher project. |
07:08 | La kyrshan ia kane ka project da ka National Mission on Education lyngba ka ICT, MHRD, jong ka sorkar India. |
07:16 | Shuh shuh ki jingtip halor kane ka mission phin ioh na kane ka link ba la ai harum: |
07:22 | La pynkylla sha ka ktien khasi da i Godwin pyrbot bad nga U John Heribert Nongkynrih.
Khublei naka bynta ba iasnohlang. |