Questions tagged as 'c'

1
answer

Optimizing Memory Usage Cache

I got a code implementing Dijkstra in C, and my mission is to optimize this code. The code is this: #include <stdio.h> #include <stdlib.h> #include <string.h> #define NUM_NODES 1000 #define NONE...
asked by 19.10.2015 / 03:08
1
answer

Doubt debugging a program

I was debugging a program and the following question came to me, had architecture is 32 bits Intel and had the following instruction MOV EAX, DWORD PTR SS [0X401049], and below that instruction had the following command EDX MOV, DWORD PTR SS [0X...
asked by 12.10.2015 / 19:40
1
answer

Doubt with sockets (WinSocks)

Good, I'm learning how to work with sockets (I've never worked) and decided to start with winsocks. At the moment I'm using winsock2.h and in the tutorial I'm following I came to a part that I can not understand how it works. HERE...
asked by 24.07.2015 / 01:43
1
answer

Is it possible to include allegro in a Kernel made in C?

Study for some time the construction of Operating Systems with bootloader in Assembly and kernel in C, and recently I started to study allegro. Theoretically it is possible to include allegro to the kernel made in C, but I want to know in practi...
asked by 10.09.2015 / 02:28
1
answer

C variable reading with timeout

Does anyone know how to limit the time the user can enter a value? Example: My program prints a value on the screen and the user has 4 seconds to enter and enter enter, if what he typed is = to the printed value, the value changes...
asked by 29.06.2015 / 16:40
1
answer

When programming an ARM microcontroller is it possible to change its clock after running SystemInit ()?

I resumed my studies on ARM this month, and a question that has been bothering me for some time and I have not yet gotten the test in my testing environment is whether I can change the Clock("SystemCoreClock") of my microcontroller even...
asked by 18.06.2015 / 05:25
1
answer

Remove http header in socket C

I made a socket in C. This program is operated by command line and compiled on Linux. It receives as a parameter a complete URI and a filename, and then connects to the server, retrieves the page and saves it to the reported file. After getting...
asked by 15.06.2015 / 16:45
1
answer

Problem with results

I would like to know, in the program I enter with 10 values, and the program calculates the discrete transform of the cosine-II, using this sequence of 10 numbers: 3 5 7 9 7 5 3 5 8 9 Why the first value of 30.000000 and not 61.000000 ??...
asked by 03.06.2015 / 03:44
1
answer

Concatenation of two lists chained in C

Given the TAD LIST_ENC_NC_ORD , I need to implement an operation that takes two lists and returns a list resulting from their concatenation, and can not have elements of same value. Here the TAD: typedef struct nodo { int inf; stru...
asked by 02.05.2015 / 22:44
1
answer

Why does not my code print?

I would like to know why this code I am creating does not print anything when I compile it: #include <stdio.h> #include <stdlib.h> #include <time.h> int main (void) { int dadoacerto, vidadrizzt, vidaartemis, dadod, dado...
asked by 20.04.2015 / 20:51