Questions tagged as 'c'

2
answers

Difference of calls in main

Personal do I want to know the difference between these two calls? inserir_inicio(&p, cria_no(0)); p = inserir_fim(p, cria_no(0)); When I try to switch to the first call style the code compiles but at the time of execution for everythi...
asked by 18.05.2017 / 17:15
1
answer

Number of elements allocated from a pointer

I need to know how many elements are allocated in my pointer pointer. For example with vector, sizeof(v)/sizeof(v[0]) in this way I get the number of elements that vector has. I would like to do the same, but with pointers. #include <...
asked by 16.04.2017 / 01:40
1
answer

How do I not print repeated numbers?

How do I not print repeated numbers? I saw some examples on the internet but they were something very complex in which I did not understand anything: x #include <stdio.h> int main (){ int vetA[10], vetB[10], vetC[20], i, j; printf ("In...
asked by 22.10.2017 / 23:48
1
answer

How can I access a hd sector

I would like to know how I can make a code to manipulate a sector of the HD and do a test on it as HDD regeneration does for example. And which libraries do I use in C? (I do not know if HD is pointer tmb so I'm calling it sector, forgive my ign...
asked by 12.01.2017 / 14:55
1
answer

Access the computer's Bios source code [closed]

Is there any way to access Bios source code from my computer? using assembly or c?     
asked by 09.12.2016 / 14:30
1
answer

Program to calculate media

#include <stdio.h> #include <stdlib.h> int main() { int sum = 0; int times = 0; int number; int average; while ( number != 9999 ){ printf( " Type the number and i will make the average, 9999 to end:\n "...
asked by 07.12.2016 / 02:29
2
answers

a function-definition is not allowed here before '{' what does this error mean?

I'm trying to compile my code, but the compilation returns the following error:    a function-definition is not allowed here before '{' token | I am a beginner and have looked at the code several times to understand what may be happening,...
asked by 12.10.2016 / 02:54
2
answers

Chained List C does not insert new node

I started to do a linked list program, but when I use the print function, it was not printing anything, so I discovered that LISTA after exiting the function inserts it, it returns the value NULL and I I do not know why. #inc...
asked by 28.02.2017 / 14:48
1
answer

Error: assignment of member '' in read-only object

#include <stdio.h> #include <stdlib.h> typedef struct Ecoponto{ int codigo; int contentores[3]; char *cidade; char *rua; int nporta; }ecoponto; int insereEcoponto (const struct Ecoponto ecoponto[],int tam,int pos,int cod...
asked by 02.01.2017 / 15:58
1
answer

Operations with linear queues, moving an element to first of the queue

I need an algorithm that manipulates a linear list of the FILA type. (In PASCAL, or it can be done in pseudo-code, or C, or whatever is preferable). The algorithm must take an element from the queue, remove it, and insert this element at the...
asked by 26.09.2016 / 21:25