Posts by H.Lima • 404 points
20 posts
-
0
votes3
answers149
viewsQ: Set the value of a TD using a JS function
I have the following function, which returns an entire value of an AJAX query to my SQL Server database. function qtdItensUltimaCompra(){ var url = 'AjaxQtdProdutoInsumo.jsp'; var temp =…
-
1
votes1
answer67
viewsQ: List of states where each node will be linked to a binary city search tree
Good afternoon, I wanted to know how to make a chained list of states where each state node is linked to a binary city search tree from information extracted from a file. My doubt arose after…
-
1
votes2
answers141
viewsQ: Pointer struct
With a view to the following structures: typedef struct celEstado *apontadorEstado; typedef struct{ char nome[30]; int populacao; int beneficiarios; int qtdCidades; float idh; apontadorEstado…
-
0
votes2
answers439
viewsQ: While() read by line in file . CSV
Good morning, I have the following structures: typedef struct celCidade *apontadorCidade; typedef struct celEstado *apontadorEstado; typedef struct{ char nome[100]; int populacao; int beneficiarios;…
-
4
votes1
answer76
viewsA: What logic do I use to write this program in C?
Good afternoon Leonardo, First let’s break the problem into small pieces: What your program should do? By the title put, "reverses", it is easy to deduce that he wants to reverse a string using a…
-
3
votes5
answers1048
viewsA: What is the use of knowing how to debug a code in R?
Good afternoon Giovani, - What is debugging? Broadly speaking we can say that thresh or debug, in the case of programmes, is the action of removing anomalies and/or bugs that distort the veracity…
-
1
votes1
answer75
viewsA: Simply Chained Linear List
Good afternoon Weslley, You can implement a list through a array static N elements, where N is the maximum number of items your list supports. Simplifying its structure: typedef struct { char…
-
0
votes1
answer76
viewsA: Sum letters and show value
Good afternoon Bruna, Breaking the problem into small pieces: First you can make an analysis of the rules that your problem intends to solve, according to the statement we have: The value of…
-
1
votes1
answer54
viewsA: Base converter - Segmentation fault (core dumped)
Good afternoon @Christus, The mistake mentioned by you: Segmentation fault (core dumped), happens when you try to access a memory improperly in your program, for example: If you allocate a vector of…
-
1
votes2
answers264
viewsA: Problem decreasing the size of a stack in c
Good afternoon Wingeds, I believe there is a conceptual problem in your stack, which, by definition, are data structures LIFO (Last in, first out). They can be implemented, among other forms,…
-
0
votes1
answer245
viewsA: What is the purpose of using pointers and allocation in c/c++
Good afternoon Vitor, I’m going to divide the answer into two parts to make it clear. Dynamic allocation of memory The main advantage of dynamic allocation is to work with only the required amount…
-
0
votes1
answer33
viewsA: List code not compiling well
Good afternoon Fire, So let’s go in pieces: First: skip the insert element function This is happening because you said the condition to enter the while is that the variable i is different from 0,…
-
3
votes1
answer73
viewsA: Why are the values of x and v[0] not equal? - C language
Good afternoon Luiz, This is because in function func1 (int x) you are passing the value of x, not the reference of x, so the changes of the value of x are made only within the function. If you play…
-
3
votes0
answers45
viewsQ: scanf(), gets() and fgets(). What’s the difference?
Good afternoon to all, I was studying some algorithms in C [especially Strings] and I couldn’t help noticing that fgets()and scanf() for reading strings often, but rarely use the gets() [Which is…
-
2
votes1
answer162
viewsA: Programa pula scanf
Good afternoon Marlon, Your code presents some problems. First problem: Lack of organization and clarity For you who is building the program it is very clear what it should do, but for those who are…
-
0
votes1
answer77
viewsA: I am novice and am having trouble running my program properly! Help
Good afternoon Jackson, The problem with your program is the use of scanf with this type of data. scanf reads the string until it finds a space, enter or tab, i.e.: ", "n" or " t". There are some…
-
2
votes1
answer80
viewsA: Gender neutralizer in C!
Good afternoon @Masantm, First of all: This is not as simple a question as it seems. For us humans, it is very simple and easy to identify where or not the 'x' to neutralize the genres of words, but…
-
2
votes1
answer54
viewsA: Application for marking point!
Good afternoon tspereirarj, There is a major problem in the logic of your application: the user will be able to freely manipulate the information that will be recorded simply by changing the…
-
3
votes2
answers580
viewsA: Laravel - Select in multiple tables
Good afternoon adrib, I don’t know much about php, but with a quick search on the web I found an interesting alternative to solve your problem. If I understand correctly, the problem can be…
-
3
votes2
answers2077
viewsQ: C Encryption - Caesar Cipher
Good afternoon, I’m developing a basic encryption code (Caesar’s cipher) in C. I am using the logic of traversing 2 vectors: vetText and vetLetras, where the comparison of char and then replace it…