Информатика и технология программирования


Вопросы без ответов


Определите значения переменных после выполнения действий .


//------------------------------------------------------bk43-01.cpp


&#35include &#60stdio.h&#62
struct man1
{
char name[20];
int dd,mm,yy;
char *zodiak;
struct man1 *next;
}
A1= {"Петров",1,10,1969,"Весы",NULL },
B1= {"Сидоров",8,9,1958,"Дева",&#38A1 },
*p1 = &#38B1;
void F1() {
char c1,c2,c3,c4;
c1 = A1.name[2]; c2 = B1.zodiak[3];
c3 = p1-&#62name[3]; c4 = p1-&#62next-&#62zodiak[1];
}
//------------------------------------------------------- 2


struct man2
{
char name[20];
char *zodiak;
struct man2 *next;
} C2[3] = {
{"Петров","Весы",NULL },
{"Сидоров","Дева",&#38C2[0] },
{"Иванов","Козерог",&#38C2[1] }
};
void F2() {
char c1,c2,c3,c4;
c1 = C2[0].name[2];
c2 = C2[1].zodiak[3];
c3 = C2[2].next-&#62name[3];
c4 = C2[2].next-&#62next-&#62zodiak[1];
}
//------------------------------------------------------- 3


struct tree3
{
int vv;
struct tree3 *l,*r;
}
A3 = { 1,NULL,NULL },
B3 = { 2,NULL,NULL },
C3 = { 3, &#38A3, &#38B3 },
D3 = { 4, &#38C3, NULL },
*p3 = &#38D3;
void F3() {
int i1,i2,i3,i4;
i1 =A3.vv; i2 = D3.l-&#62vv;
i3 =p3-&#62l-&#62r-&#62vv; i4 = p3-&#62vv;
}
//------------------------------------------------------- 4


struct tree4
{
int vv;
struct tree4 *l,*r;
}
F[4] =
{{ 1,NULL,NULL },
{ 2,NULL,NULL },
{ 3, &#38F[0], &#38F[1] },
{ 4, &#38F[2], NULL }};
void F4() {
int i1,i2,i3,i4;
i1 = F[0].vv; i2 = F[3].l-&#62vv;
i3 = F[3].l-&#62r-&#62vv; i4 = F[2].r-&#62vv;
}
//------------------------------------------------------- 5


struct list5
{
int vv;
struct list5 *pred,*next;
};
extern struct list5 C5,B5,A5;
struct list5 A5 = { 1, &#38C5, &#38B5 },
B5 = { 2, &#38A5, &#38C5 },
C5 = { 3, &#38B5, &#38A5 },
*p5 = &#38A5;
void F5() {
int i1,i2,i3,i4;
i1 = A5.next-&#62vv; i2 = p5-&#62next-&#62next-&#62vv;



Начало  Назад  Вперед