.


:




:

































 

 

 

 


. ,




, .

int mas[10];

                   
                   

. . mas 0 9, 10 .

:

double d[] = {1, 2, 3, 4, 5};

.

-, . . (a[0]).

a

               

*a = = a[0];

*(a+1) = = a[1];

.........

*(a+i) = =a[i];

C/C++ , , , .

int a[5][5];

:

a[m][n] = = *(a[m]+n) = = *(*(a+m)+n);

1.4.
new delete

new delete.

new _

new _

, , . , . , , NULL.

:

int *i;

i=new int(10);

float *f;

f=new float;

int *mas=new[5];

1, 2 , 3 .

delete new.

:

int ** make_matr(int n)

{

int **matr;

int i,j;

matr=new int*[n];

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

{

matr[i]=new int[n];

for (j=0;j<n;j++)

matr[i][j]=random(10);

}

return matr;

}

, n .

for(int i=0;i<n;i++)

delete matr[i];

matr

delete [] matr;

1.

1) , .

2) .

3) .

4) 0.

5) .

 

 

2.

1) , .

2) .

3) 0.

4) M[I-1]+2.

5) .

 

3.

1) , .

2) .

3) 0.

4) M[I-1]+2.

5) .

 

4.

1) , .

2) .

3) , 3.

4) |M[ I-1 ]+1|.

5) .

 

5.

1) , .

2) .

3) 7.

4) 0.

5) .

 

6.

1) , .

2) .

3) .

4) M[I-1]+2.

5) .

 

7.

1) , .

2) .

3) 0.

4) 100.

5) .

8.

1) , .

2) .

3) .

4) 0.

5) .

 

9.

1) , .

2) .

3) .

4) .

5) .

 

 

10.

1) , .

2) .

3) 5 .

4) 3 .

5) .

 

11.

1) , .

2) .

3) 5 .

4) 3 M[I+1]+2.

5) .

 

 

12.

1) , .

2) .

3) .

4) , , 10%.

5) .

 

13.

1) , .

2) .

3) .

4) 3 .

5) .

 

14.

1) , .

2) .

3) , , .

4) 3 M[ I+10 ]-2.

5) .

. , , .

, .


3

: .





:


: 2016-03-28; !; : 634 |


:

:

: , .
==> ...

1503 - | 1472 -


© 2015-2024 lektsii.org - -

: 0.015 .