Posts by Gean Santos • 38 points
8 posts
-
0
votes1
answer30
viewsA: The variable of a vector is replacing that of another vector, only in a specific case
Your code has a flaw: you create the vetor2 sized dois-1 and depoisacessa the vector in position dois-1 in the loop for, this was supposed to be a segmentation failure, but, for some reason, neither…
canswered Gean Santos 38 -
0
votes1
answer18
viewsA: Assemble an Array of at most 10 x 10, which the user chooses the order in a function, and then assemble the matrix in another function
Some flaws and bad-Smells in the code: You need the values obtained in the function ler remain in the variables l and c in function main, then one needs to pass the reference of these variables.…
-
0
votes1
answer32
viewsA: Create a program that reads a number between 2 and 20 and generate a screen with the configuration shown below:
Running the program below and typing the number 1234567, the program will print on the screen what is asked in the question title. #include <stdio.h> // printf #include <math.h> // log10…
-
1
votes1
answer1969
viewsA: Binary search tree in C
Your code is already finding the largest sum, only missing a structure to store the route. For example, instead of returning only the sum value, return a structure that contains the sum and a list…
canswered Gean Santos 38 -
0
votes1
answer2189
viewsA: Python: SOAP requests, how to request a wsdl
Your server is waiting for a Soapaction parameter in the header. No request would be: url = 'https://ws1.bmgconsig.com.br/webservices/SaqueComplementar?wsdl' headers = {'input name':…
-
0
votes1
answer71
viewsA: How to generate lists named after an item from another list?
If you want to create the lists with the name in the source code, then you need to create a file and print the new code with the names you want respecting the language syntax. However, it is simpler…
pythonanswered Gean Santos 38 -
0
votes1
answer796
viewsA: Read file and sort words alphabetically (with removal of special characters)
See that ch is declared with size 50, but in fgets you admit up to size 1024 to put in ch. Another strange part is: tamanho = strlen(palavra); if(tamanho > 20){ //printf("String nao salva\n");…
-
1
votes1
answer88
viewsA: C++ - What are the effects of & Hexadecimal operator?
The operator & do an operation E binary, i.e., does the operation on each bit (bit by bit) for this, the two variables must have the same amount of bits, or the compiler will cast depending on…