Cov txheej txheem:

Dab tsi yog hom ntaub ntawv thiab cov ntaub ntawv sib txawv?
Dab tsi yog hom ntaub ntawv thiab cov ntaub ntawv sib txawv?

Video: Dab tsi yog hom ntaub ntawv thiab cov ntaub ntawv sib txawv?

Video: Dab tsi yog hom ntaub ntawv thiab cov ntaub ntawv sib txawv?
Video: Hmoob qauv ntaub qauv ntawv (Part 1 of 7) 2024, Hlis ntuj nqeg
Anonim

Qee yam hom ntaub ntawv suav nrog integers, floatingpoint tooj, cim, hlua, thiab arrays. Tej zaum lawv kuj yuav hais meej ntxiv hom , xws li hnub tim, timestamps, booleanvalues, thiab varchar ( sib txawv tus cwj pwm) formats.

Ib yam li ntawd, tib neeg nug, cov ntaub ntawv sib txawv yog dab tsi?

Hom ntaub ntawv uas muaj xws li:

  • tus lej.
  • cov booleans.
  • cov cim.
  • floating point tooj.
  • alphanumeric cov hlua.

Kuj Paub, hom ntaub ntawv piav qhia yog dab tsi? Cov hom ntaub ntawv ntawm tus nqi (los yog sib txawv insome contexts) yog tus cwj pwm uas qhia tias yam twg cov ntaub ntawv tus nqi ntawd muaj peev xwm muaj. Cov ntaub ntawv hom suav nrog cov chaw khaws cia xws li cov lej, cov ntsiab lus ntab ntab, cov hlua, cov cim thiab lwm yam.

Kuj kom paub yog, dab tsi yog qhov sib txawv ntawm cov ntaub ntawv hom hauv C?

Hom ntaub ntawv hauv C Lus

  • Cov ntaub ntawv tseem ceeb: Cov no yog cov ntaub ntawv tseem ceeb hauv Cnamely integer(int), floating point(float), character(char) thiab void.
  • Derived data type: Derived data types tsis muaj dab tsi tab sis cov ntaub ntawv tseem ceeb tab sis me ntsis twisted los yog ua ke ua ke xws li array, stucture, union thiab pointer.

Dab tsi yog hom ntaub ntawv siv rau?

Cov ntaub ntawv hom Ib txhia yog siv khaws cov lej, qee qhov yog siv khaws cov ntawv thiab qee qhov yog siv rau ntau nyuaj hom ntawm cov ntaub ntawv . Cov hom ntaub ntawv toknow yog: hlua (los yog str lossis ntawv). Siv rau kev sib xyaw ua ke ntawm cov cim uas tshwm sim ntawm cov keyboard, xws li cov tsiaj ntawv, lej thiab cov cim.

Pom zoo: