logo

Crowdly

Browser

Add to Chrome

Course 413

Looking for Course 413 test answers and solutions? Browse our comprehensive collection of verified answers for Course 413 at else.fcim.utm.md.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Что напечатает код?

std::list < int > lst = {1}; lst.pop_front(); lst.pop_front(); std::cout << lst.empty();

View this question
Для выражения (3*(6/(2+1)))-(4+(5*2)) написать последовательность создания узлов дерева при работе функции

PNode MakeTree (char Expr[], int first, int last)

{ int MinPrt, i, k, prt; PNode Tree = new Node; // создать в памяти новую вершину

if ( first == last ) { // конечная вершина: число или

Tree->data = Expr[first]; // переменная

Tree->left = NULL; Tree->right = NULL;

return Tree;

}

MinPrt = 100;

for ( i = first; i <= last; i ++ )

{ prt = Priority ( Expr[i] );

if ( prt <= MinPrt )

{ // ищем последнюю операцию

MinPrt = prt; // с наименьшим приоритетом

k = i;

} }

Tree->data = Expr[k]; // внутренняя вершина (операция)

Tree->left = MakeTree (Expr,first,k-1); // рекурсивно строим

Tree->right = MakeTree (Expr,k+1,last); // поддеревья

return Tree; }

View this question
Для выражения (6/(3+3))*(9-(4*2)) написать обход ЛПК
View this question
Что напечатает код?

std::deque < int > dq = {9, 2, 5}; dq.clear(); dq.push_back(11); dq.push_front(8); std::cout << dq.back() << " "; for (int x : dq) std::cout << x << " ";

0%
0%
0%
0%
0%
0%
0%
0%
0%
View this question
2

Дан образец

P = abcdabcdabcd, Чему равно max δ(n, a)? n от 0 до length(P).

View this question
Что напечатает код?

int main()

{

struct S { int x; int y; };

struct S A = {4,6};

struct S *p = &A;

printf("%d %d", (*p).x++, (*p).y++);

return 0;

}

0%
0%
0%
0%
0%
View this question
Что напечатает код?

struct S { int a; struct S *b; struct S *prev; };

struct S *x = malloc(sizeof(struct S));

struct S *y = malloc(sizeof(struct S));

struct S *z = malloc(sizeof(struct S));

x->a = 1; x->b = z; x->prev = y;

z->a = 2; z->b = y; z->prev = x;

y->a = x; y->prev = z;

printf("%d", x->b->b->b->b->b->a);

0%
0%
0%
0%
0%
0%
0%
0%
View this question
Что напечатает код?

std::queue < int > q;

q.push(7);

if(!q.empty())

{

q.pop();

}

else

{

q.push(5);

}

std::cout << q.empty();

0%
0%
0%
0%
0%
0%
0%
0%
View this question

Дан массив [10, 4, 7, 1, 9, 2, 8, 5, 6, 3]. Использовать процедуру Heapify (построение снизу вверх). Ответ Max-Heap:

View this question
Что напечатает код?

struct S {

int S;

int a;

} ;

struct S {

struct S s;

int a;

} S,s ;

int main()

{

printf("%d %d ",S.s.S++,--S.s.a);

return 0;

}

0%
0%
0%
0%
0%
0%
0%
View this question

Want instant access to all verified answers on else.fcim.utm.md?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome