Dab tsi yog implicit hom conversion hauv C?
Dab tsi yog implicit hom conversion hauv C?

Video: Dab tsi yog implicit hom conversion hauv C?

Video: Dab tsi yog implicit hom conversion hauv C?
Video: Hmong New Song 2019 Xy Lee feat. SuabNag Yaj - Koj Yog Kuv Lub Neej (Official MV - 4K) 2024, Hlis ntuj nqeg
Anonim

Implicit hom conversion tshwm sim cia li thaum tus nqi tau theej rau nws cov ntaub ntawv sib xws hom . Thaum hloov dua siab tshiab , nruj kev cai rau hom kev hloov pauv raug siv. Yog hais tias tus operands yog ntawm ob cov ntaub ntawv sib txawv hom , ces tus operand muaj cov ntaub ntawv qis dua hom yog txiav txim hloov dua siab tshiab rau hauv cov ntaub ntawv siab dua hom.

Yog li ntawd, dab tsi yog implicit hom conversion?

Implicit hom conversion yog ib qho tsis siv neeg hom kev hloov pauv ua los ntawm lub compiler thaum twg cov ntaub ntawv los ntawm txawv hom yog intermixed. Thaum ib implicit hloov dua siab tshiab ua tiav, nws tsis yog tsuas yog rov txhais cov lus qhia tus nqi tab sis a hloov dua siab tshiab ntawm tus nqi ntawd rau tus nqi sib npaug hauv qhov tshiab hom.

Tsis tas li ntawd, hom kev hloov pauv nrog piv txwv yog dab tsi? Ib qho piv txwv yuav yog kev hloov pauv ntawm ib qho tus lej tus nqi rau hauv tus nqi taw tes lossis nws cov lus sawv cev raws li txoj hlua, thiab rov ua dua. Hom kev hloov pauv tuaj yeem ua kom zoo dua ntawm qee yam nta ntawm hom hierarchies lossis cov ntaub ntawv sawv cev.

Qhov thib ob, txhais li cas los ntawm hom hloov dua siab tshiab hauv C?

Cov hom kev hloov pauv txheej txheem hauv C yog qhov pib hloov dua siab tshiab ib hom ntawm cov ntaub ntawv hom rau lwm tus los ua qee yam haujlwm. Cov hloov dua siab tshiab tsuas yog ua tiav ntawm cov datatypes nyob rau hauv hloov dua siab tshiab yog ua tau ex – char rau int thiab vice versa.

Dab tsi yog implicit thiab meej?

Cov ntsiab lus. Implicit thiab meej muaj ze lub ntsiab lus sib txawv, yog li nws tseem ceeb heev kom nco ntsoov lawv qhov sib txawv. Kev cuam tshuam yog indirectly hais los yog implied. Qhia meej yog hais ncaj qha thiab spelled tawm.

Pom zoo: