Computer Programming Assessment Results
Computer Programming Assessment Results
ELIANE YOKO TOMITA Activity completed on 09/13/2021 20:57:49 (attempt: 1) # Correct answer - Question Annulled
Discipline:
ALGORITMO E PROGRAMAÇÃO DE COMPUTADORES [capítulos - 4,5,6] - Avaliação com10questões, com o peso total de30,00pontos
Class:
Second Degree: Training for Second Baccalaureate in Physics - Group: JUNE/2021 - FDLICFIS/JUN21 [22755]
Student:
91210818 - ELIANE YOKO TOMITA - Respondeu9questões corretas, obtendo um total de27,00pontos como nota
#include<stdio.h>
#include<conio.h>
int i, grade;
int main()
{
for ( i=1 ; i<=10 ; i=i+1)
{
printf("\nEnter the grade: "); scanf("%d", &grade);
if (grade < 60)
{ printf("\nStudent FAILED"); }
else
Question
004 Student APPROVED
}
getch();
}
I. This algorithm reads the grades of 10 students, indicating for each grade whether the student is
approved or disapproved.
II. This algorithm will not compile and run correctly because it presents some kind of
error.
III. The main mistake made by this algorithm is the definition of a structure
conditional within a loop structure.
IV. If all students have passed the test conducted in the structure
conditional will always be evaluated as FALSE.
Question
005 Arrays are also called
Functions or Procedures
Selection Structures.
Repetition Structures
X Vectors or Matrices
Set of diverse types
#include<stdio.h>
#include<conio.h>
int altura,largura,area;
int main()
{
printf("Enter the Height: "); scanf("A", &height);
printf("Enter the Width: "); scanf("%d", &width);
area = altura * largura;
Question if (B)
006
{
The area of the rectangle is: %d
}
C
{
The area of the square is: %d
}
getch();
}
I. When the return command is associated with a value, this value must be of
the same type as the function declaration and will be returned to the calling process
Question
007 function.
II. Global variables are defined this way because they have global visibility, so they can
to be used anywhere within the global program they are part of.
III. In the C language, variables can only be declared at the beginning of
blocks, that is, after the opening of the braces {
Only III is true
X Only I and II are true
Only II and III are true
Only I and III are true
All the alternatives are true
Enade Computer Science (2017) - The following algorithm works with an array
global vector of integers and rearranges this vector so that its elements,
in the end, they should be sorted in ascending order. Note that n is a global variable
what determines the size of the vector.
Question
009
Considering that there are logical errors in this algorithm that need to be corrected to
that the elements be arranged in ascending order, mark the correct option in
that refers to the appropriate corrections.
Line 04 should be corrected as follows: for ( i = 1; i < n - 1; i++) and line 07,
in the following way: j = i + 1;
X
Line 08 should be corrected as follows: while ( j >= 0 && v [ j ] > key) and the
line 10, as follows: v[j + 1] = v[j];.
Line 04 should be corrected as follows: for (i = 1; i < n - 1; i++) and line 13,
in the following way: v[j - 1] = key;
Question
010 Mark the correct alternative
The input and output tasks in an algorithm are complementary tasks of
should always be carried out together
Reserved words are some words of a programming language.
what we need to book before its use
The order of precedence of the operators determines the order in which we should use them.
the same, unable to use one before the other that has greater precedence
To assign a value to a variable, we must use the logic operator.
assigned relational
X
Syntax is a term used in algorithms and programming to describe the form
basic instruction or command