Cov txheej txheem:
Video: Muaj pes tsawg theem ntawm indirection nyob rau hauv pointers koj muaj peev xwm muaj nyob rau hauv ib qho kev tshaj tawm?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
Koj puas tuaj yeem muaj nyob rau hauv ib qho kev tshaj tawm? cov lus teb yog "tsawg kawg 12." txhawb ntxiv. ntawm saj, tab sis muaj qhov txwv. Muaj ob qib ntawm indirection (tus pointer rau ib qho pointer rau ib yam dab tsi) yog qhov ntau.
Ntawm no, muaj pes tsawg tus taw tes sib txawv?
Muaj ob qib ntawm indirection (a taw tes rau a taw tes rau ib yam dab tsi) yog ntau. Ib qho ntau tshaj qhov ntawd tau txais me ntsis nyuaj los xav txog yooj yim; tsis txhob ua nws tshwj tsis yog tias lwm txoj kev yuav phem dua. Yog koj txhais tias " Muaj pes tsawg tus pointer indirection koj tuaj yeem muaj ntawm runtime, " muaj tsis txwv.
Ib tug kuj yuav nug, dab tsi nyob ze thiab loj pointers? Nyob ze tus taw tes yog siv los khaws 16 qhov chaw nyob txhais tau hais tias nyob rau hauv ntu tam sim no ntawm lub tshuab 16 ntsis. Qhov kev txwv yog tias peb tsuas tuaj yeem nkag tau 64kb ntawm cov ntaub ntawv ib zaug. A deb pointer feem ntau yog 32 ntsis uas tuaj yeem nkag mus rau lub cim xeeb sab nraud ntu tam sim no.
Hauv qhov no, lub luag haujlwm ntawm tus taw tes no yog dab tsi?
Qhov no taw tes yog a taw tes nkag tau tsuas yog nyob rau hauv lub nonstatic tswv cuab muaj nuj nqi ntawm ib chav kawm, struct, los yog union hom. Nws taw rau cov khoom uas tus tswv cuab muaj nuj nqi hu ua. Static member muaj nuj nqi tsis muaj qhov no taw tes.
Thaum twg peb yuav tsum siv cov pointers hauv AC program?
Cov ntsuas tau siv (hauv hom C) hauv peb txoj kev sib txawv:
- Txhawm rau tsim cov ntaub ntawv dynamic.
- Yuav kom dhau thiab tswj cov kev hloov pauv tsis tau dhau mus rau cov haujlwm.
- Txhawm rau nkag mus rau cov ntaub ntawv khaws cia hauv arrays. (Tshwj xeeb yog tias koj ua haujlwm nrog kev sib txuas).
Pom zoo:
Qib 11 Kev Tshaj Tawm Txog Kev Tshaj Tawm thiab Kev Paub Txog Xov Xwm yog dab tsi?
People Media (Media thiab Information Literacy for Grade 11) 1. Print Media -Medium uas siv tej ntaub ntawv luam tawm (xws li ntawv xov xwm, ntawv xov xwm, thiab lwm yam) los qhia cov ntaub ntawv. Nws muaj qhov nruab nrab ntawm cov neeg tuaj saib thiab siv cov ntawv pom lossis cov duab. -Tsuas yog tus thawj pab / cuab yeej ntawm cov kws qhia ntawv thiab cov tub ntxhais kawm hauv chav kawm (cov phau ntawv)
Puas txhais tau tias yog kev sib raug zoo ntawm cov khoom ntawm ib yam khoom thiab lub peev xwm ntawm tus neeg sawv cev uas muab cov lus qhia rau kev siv cov khoom?
Kev them nyiaj yog kev sib raug zoo ntawm cov khoom ntawm ib yam khoom thiab lub peev xwm ntawm tus neeg sawv cev uas txiav txim siab seb qhov khoom siv tau li cas
Daim ntawv teev npe ntawm metric prefixes nyob rau hauv kev txiav txim los ntawm tsawg tshaj plaws mus rau loj tshaj?
Tshwj tsis yog hais tias lwm yam, lawv ua hauj lwm nyob rau hauv increments ntawm 1000, thiab yog, los ntawm tsawg tshaj plaws mus rau loj, Yokto (y) - sib raug rau. Zepto (z) Atto (a) Femto (f) Pico (p) Nano (n) Micro () - sib raug rau. Milli (m) - sib raug rau 0.001
Puas muaj peev xwm loj tshaj plaws ntawm ib qho chaw cia khoom?
2. Qhov twg hauv qab no muaj peev xwm loj tshaj plaws rau kev khaws cia? Blu-duab tshav, ntawm qhov siab tshaj plaws ntawm 50 GB, muaj peev xwm cia ntau tshaj plaws
Muaj pes tsawg cov khoom nyob hauv ib byte pes tsawg tus nibbles nyob hauv ib byte?
Txhua 1 lossis 0 hauv tus lej binary raug hu ua me ntsis. Los ntawm qhov ntawd, ib pawg ntawm 4 cov khoom hu ua nibble, thiab 8-ntsis ua ib byte. Bytes yog ib tug zoo nkauj buzzword thaum ua hauj lwm nyob rau hauv binary