Questions tagged as 'c'

1
answer

What is the meaning of Node?

I'm studying piles and queues, below I was given a code to parse. The code first creates queue after queuing the values. After that it removes each of the values from the queue and tells you whether or not you succeeded in removing the value....
asked by 15.12.2017 / 20:32
1
answer

Pointer pointer to change my stack. Why should I use them?

I'm doing a code that consists of parsing an arithmetic expression, and checking if when I open a '(', then I should close a ')'. That is, check whether the expression is valid or not. For this I implemented a stack to help me solve this problem...
asked by 13.07.2017 / 06:02
1
answer

What is raw () in ncurses.h?

Recently I'm trying to learn more about the ncurses library and I came across some codes that use raw(); When I took it to test what happened, it did not change anything, the code compiled and worked perfectly. So why does raw () exist? Wha...
asked by 10.05.2018 / 23:19
1
answer

Type modifier: register

The type modifier register instructs the compiler to store the variable directly in the registers, however I do not see much use of it in codes, this put, I get the following doubts: In what context is its use recommended and when not...
asked by 05.12.2016 / 23:18
1
answer

What is the correct way to declare a struct in C?

Also how to rename struct data types? I have doubt about this because of a Windows Manager that I use has the following code: typedef struct exem exem; struct exem { tiposdedado variavel; };     
asked by 29.10.2016 / 13:52
1
answer

Difficulty in placing non-significant zeros in a converted binary number

I found a code on the web that converts decimals to binaries (32 bits), however I needed one of (256 bits) so I changed the code the way I thought it was correct, however after a certain size the non-significant zeros are added the correct way ....
asked by 27.11.2016 / 23:55
2
answers

Difference between local variable VS global variable

In my micro controller classes the variables are always defined globally and very rarely locally and I would like to know why, because in my head it makes a difference between being global or local. 1. 2. Both the local variable an...
asked by 28.09.2018 / 16:49
1
answer

Why is it possible to store a string in a char pointer?

Why does char store a single character and the pointer points to its value in memory, so should it not have only one character? Example: char *str = "Ola"; Why str does not store just one character?     
asked by 17.11.2018 / 17:55
1
answer

Dynamic memory allocation X vector

I was studying this subject in C, and in most places I'm looking for, one of the examples of using this feature is when you're going to create a vector whose size you do not know. Example: int main() { int num = 0, i = 0, *vetor; pri...
asked by 26.03.2016 / 03:44
1
answer

Performance difference between static and shared library

Which is the best in performance? Compile the program using libraries such as MySQL Connector and SQLite as static (getting inside the compiled binary) or as shared getting separated from the binary. In addition, can you use a shared libra...
asked by 13.04.2016 / 03:42