Posts by Lucas Lopes • 89 points
9 posts
-
1
votes2
answers75
viewsQ: Error in Arduin (pointer to struct)
I’m trying to make the definition of types below but the Arduino accuses error of type declaration. /*Estrutura que abstrai a seringa*/ struct { int pot[7]; float nivel[7] = {0, 0.5, 1, 1.5, 2, 2.5,…
-
0
votes1
answer94
viewsQ: Double linked list in C
Hello, I can’t understand what’s wrong with the code below. It was to add an element at the end of the linked list, but nothing happens and everything compiles without errors. Can someone help me,…
-
-1
votes1
answer125
viewsQ: Segmentation Error
Hello. Could anyone help me with this error (Segmentation fault)? I don’t know why it’s happening. #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct cel {…
-
0
votes1
answer33
viewsQ: Does not enter the function and gives fault Segmentation
Hello, please consider the structure and functions given below and the types defined. In the main function, when you enter the odd even function of the error of Segmentation fault. I don’t…
casked Lucas Lopes 89 -
1
votes2
answers1557
viewsQ: Number of recursive function calls
Hello. How could you know how many times a function is called recursively by its code? For example, in the code below, how to know how many asterisks the function prints for a given value n? int…
-
3
votes2
answers121
viewsQ: Using float to check overflow in unsigned long int
Hello, all right? Please review this code: #define max 4294967295 unsigned long int collatz(unsigned long int n, unsigned long int passos, float *maiorN) { float overflow = 3 * n + 1; if (n == 1)…
-
1
votes0
answers106
viewsQ: Overflow in unsigned long int - C
The unsigned long int type stores a maximum value of 4294967295 (2 32 - 1) while the float value stores a maximum of 10 38. I’m doing an overflow test on an unsigned variable long int. Look at the…
casked Lucas Lopes 89 -
1
votes1
answer349
viewsQ: Check if an expression is well formed
I was trying to make a program that checks if an expression is well formed. Something like {[()()]} is well formed while something like {{())({] is not. I implemented a bilbioteca "cell. c" from…
-
0
votes1
answer208
viewsQ: Pointers and data type hidden in C
EDIT: I’ll leave the codes right below in text same. Good evening. Please see attached image. It is the implementation of a function whose prototype is defined in another file named "stack. h". As…
casked Lucas Lopes 89