.


:




:

































 

 

 

 





\++.

 

:

 

1. : , \++;

2. .

 

:

- , IBM PC.

 

:

- Windows;

- Microsoft Visual C++ 5.0 ( Microsoft Visual C++ 5.0).

 

 

1.1. Microsoft Visual C++ 5.0;

1.2. , Microsoft Visual C++ 5.0;

1.3. ;

1.4. .

 

 

2.1. Microsoft Visual C++ 5.0;

2.2. *.cpp ;

2.3. ;

2.4. : 2 3 . 2, 3 ;

2.5. Microsoft Visual C++ 5.0 .

 

 

3.1. .

3.2. .

3.3. .

3.4. .

3.5. .

3.6. .

 

, . , , .

, ().

_[]

:

int arr1[10]; // 10 int

double arr2[50]; // 50 double

i- : vals[i] i 0 N-1, N- .

, , . , .. , , .

/++ . . .

_[1] [2] [3] [N]

:

int vals[5][7]; // , 57

char text[10][25][80]; // 10 x 25 x 80

, , - . , , .

int a[2][3]; /*

a[0][0] a[0][1] a[0][2];

a[1][0] a[1][1] a[1][2] */.

, , , . , 10×6×9×4 2160 .

.

:

#include<iostream.h>

void main()

{

int i;

int x[10];

for (i=0;i<10;i++)

{

cout<<"x["<<i<<"]=";

cin>>x[i];

}

}

 

 

.

_ _ [1][N] = {_}

_ , . . , .. , } .

, :

int vals[10]={1,2,3,4,5,6,7,8,10};

:

int b[2][2] = { { 1,2 }, { 3,4 } };

:

int b[]3[] = { { 1,2 }, { 3,4 } };

, 0, .. :

int b[2][2] = { { 1,2 }, { 3 } };

1 2, 3 0.

 

 

, 0. \0. . char stroka[ ] = ""; 7 , () \0, . , :

char stroka[ ] = {,,,,,,\0};

, , , , .

stroka , :

char stroka[5] = "";

stroka , Ғ \0. , , 0.

 

 

, . ++ main, . . , , , , , , , . . , . . , , , , . .. , include. . , , . return , , .

 

 

.





:


: 2016-12-06; !; : 539 |


:

:

, .
==> ...

1668 - | 1487 -


© 2015-2024 lektsii.org - -

: 0.015 .