VARIABLE constant variable keyword const float pi3 1416
ក របងក ត VARIABLE ព ល បងក ត constant variable តរវបរ keyword តមល ទ ឲយវ ន ព លន ។ const float pi=3. 1416 f; pi=3. 14 f; //error: read only printf(“My Constant %f”, pi); const ហ យដ ចខ តតរវ assign
ក របងក ត VARIABLE Ex: #include<stdio. h> #include<windows. h> #define path ""D: \Subject\test. cpp"" void main() { system(path); }
ក របងក ត VARIABLE ចននគត Variable Type Character Integer Short integer Long integer Keyword char int short long Bytes Required 1 2 2 4 Unsigned character unsigned char 1 Range -128 to 127 -32768 to 32767 -2, 147, 483, 648 to 2, 147, 438, 647 0 to 255 Unsigned integer Unsigned short integer Unsigned long integer Single-precision floating-point Double-precision floating-point unsigned short 2 2 0 to 65535 unsigned long 4 0 to 4, 294, 967, 295 float 4 double 8 1 Approximate range; precision = 7 digits. 2 Approximate range; precision = 19 digits. Note: E-5 represents 10 -5. Thus, -0. 22 E-5 = -0. 0000022. 1. 2 E-38 to 3. 4 E 381 2. 2 E-308 to 1. 8 E 3082
ក របងក ត VARIABLE ចនន ពត (ផន កទសសភ គ ចនន ពតតរវប នប ងច កជ ប បរភ ទទ តគ ) float, double, long double Type Storage size Value range Precision float 4 byte 1. 2 E-38 to 3. 4 E+38 6 decimal places double 8 byte 2. 3 E-308 to 1. 7 E+308 15 decimal places long double 10 byte 3. 4 E-4932 to 1. 1 E+4932 19 decimal places float, double, long double ជ Data. Type ដ លអ ចទទលយកទ ងតមល ចននគត ទ ងចននទសសភ គ ។
VARIABLE q Constance character § ជ បណត Character ដ លម នអតថនយពស ស Sequence Meaning a បនលសល ង b Backspace n ច បនទ ត t ចលបនទ តមយ \ Backslash ? Question mark ’ Single Quotation n The Character n r បញជ Cursor ឱយតរឡបទ ដ មបនទ ត បរ សមរ បបញចប Bell (alert) Tab String
ក របងក ត VARIABLE v String គជ array ន character (បណដតរអកសរជ ចរ ន v Syntax: datatye_name_varibale [index]; v )ដ លគ ហ ថ String។ “ there are string” t h e r ឩទ ហណ៖ char ch[5]; ch[0] ch[1] e a ch[2] r e ch[3] s ch[4] t r i n g
ក របងក ត VARIABLE q រប បផដលតល ឱយ q char c[]="abcd"; char c[5]="abcd"; q q q String char c[]={'a', 'b', 'c', 'd', '