·

Ciência de Dados ·

Programação

Send your question to AI and receive an answer instantly

Ask Question

Preview text

Simulado AV\n\nTemos uma continuidade simulada\n\nQuestão 1:\n\n#include <iostream>\n\nusing namespace std;\n\nint main() {\n int a = 5, b;\n b = a;\n cout << b;\n return 0;\n}\n\nQuestão 2:\n\nint main() {\n int a, b;\n a = 10;\n b = 20;\n int c = a + b;\n cout << \"A soma de a e b = \" << c << endl;\n return 0;\n}\n\nQuestão 3:\n\nA que tipo de operadores lógicos na linguagem C++ corresponde à lógica matemática para manipulação?\n\nA) != é b)\nB) b)\nC) a)\nD) \"&\"\nE) \"|\"\n\nO valor relacional 2 > 1. Os outros dois são operadores lógicos\nOperadores matemáticos Questão 4:\n\nFalso. Comando repete é do rotacionamento. Comando enganou e foi reportado.\n\n// programa de exemplo\n#include <iostream>\nusing namespace std;\n\nint main() {\n for (int i = 0; i < 5; i++) {\n cout << i << \" \" << endl;\n }\n return 0;\n}\n\n// Tabela\nint valores[5] = {0, 1, 2, 3, 4};\n\nfor (int i = 0; i < 5; i++) {\n cout << valores[i] << endl;\n}\n\n\n\n// Tabela\nvalores[0] = 10;\nvalores[1] = 20;\nvalores[2] = 30;\nvalores[3] = 40;\nvalores[4] = 50;\n// Saída esperada\n// 10\n// 20\n// 30\n// 40\n// 50\n// Questão 5:\n\nint main() {\n int i = 0;\n while (i < 10) {\n cout << i++ << \" \";\n }\n return 0;\n}\n\n// Saída: 0 1 2 3 4 5 6 7 8 9\n//