.


:




:

































 

 

 

 


,




, , . - , . , , , . ,

(4 5) - 4 16.

- " 4, 5, 4".

:

- , ;

- , ;

- , 1 0 ( "" "".

( ), ( ) ( ).

:

& int MyVal = 1024; int *pint; pint = &MyVal; *pint = *pint + 1; cout << MyVal;
* ()
-
+
~ unsigned short i; (0... 65 535); i=10; i=~i; cout << i;
!  
++ ( )  
-- ( )  
sizeof  
::  

 

:

+
-
*
/
%
()
<
>
<=
>=
= =
!=
&& ()
| | ()
=
*=
/=
%=
+=
-=
<<
>>
&
| -//-
^ -//-

 

. , , :

 

int MyVal1 = 21 / 6;

int MyVal2 = 21 / 7;

MyVal1, MyVal2 3.

, .

Float res;

res = 5/4;

: res = 1.

, "",

Float res;

res = 5./4.;

: res = 1.25.

 

 

, . , , -.

, (<<) (>>) , .

i i , i .

i i , , . i .

 

.

, . , : , . :

 

int x;

char ch;

float f;

void func(void)

{

ch = x; /* 1 */

x = f; /* 2 */

f = ch; /* 3 */

f = x; /* 4 */

}

 

1 () x , ch 8 . 255 0, ch . ch . 2 f. 3 f 8- , ch, . 4 f , .

, , .

, :

1) , ,

2) int float float double . .

. , . , . .

1) char short int int. float double.

2) long double, long double.

3) double, ( long double) double.

4) long, long.

5) unsigned, unsigned.

. , .

 

Char ch;

Int i;

Float f;

Double d;

result = (ch/i) + (f*d) (f+i);

 

C ch int, f double. ch/i double, f*d double. double, double.





:


: 2016-11-23; !; : 328 |


:

:

.
==> ...

1667 - | 1638 -


© 2015-2024 lektsii.org - -

: 0.013 .