Questions tagged as 'c'

1
answer

Call functions in C from R

I need to optimize some functions that are in the C language, but using the genetic algorithm packages in R. Is there any way to call C functions in R? In matlab I know there is this possibility through mex . Does not R have somethin...
asked by 01.07.2015 / 14:16
2
answers

How to write in the sublime text?

I downloaded the sublime text, and set it to program in c, but scanf does not work, it shows the value of the variable, I can not type. #include <stdio.h> void main() { int x; scanf("%d", &x); printf("%d", x); } I can no...
asked by 05.12.2015 / 22:36
0
answers

How to create a System Call to extract data from a process in progress? [closed]

I need to make a System Call that receives a PID as a parameter and returns the number of bytes that this process read from the standard input, from the disk, and how many bytes it wrote to the USB port. As I'm a beginner in programming for Linu...
asked by 19.11.2015 / 18:02
0
answers

client and UDP server send data but not receive (C windows)

Hello, I'm trying to create an application that performs data exchange on the network, so there is an initial connection using TCP sockets that is working normally, then comes the use of UDP sockets, however I can not perform data exchange, send...
asked by 26.12.2015 / 16:55
1
answer

Dynamic Allocation and Pointers on the Moon

I would like to know how to do dynamic allocation and pointer of a structure in Lua, I have the following statement in C that I need to pass to Lua; typedef struct ilha { char name; struct ilha *prox1, *prox2, *prox3; } *Ilha; Ilha al...
asked by 10.11.2015 / 14:08
1
answer

Read from file and use read parts to call functions

I have a file that contains calls to functions in my code. Some examples of functions are criar(), inserir(elemento, conjunto), listar(conjunto) where arguments are integers passed to the function. These functions should be called through...
asked by 04.11.2015 / 18:13
1
answer

How to find something specific inside a text file

Hello, I have to check the grades of a particular student and if his average is greater than 5 show the name so I do not have the idea of how to do this ... nor to ask how he does it so sorry if I was not clear struct ALUNOS{ char nome[50];...
asked by 05.11.2015 / 17:09
1
answer

bitWrite function code to use with PIC microcontroller

I am therefore an Arduino code for the PIC pro compiler MikroC. I came up with a part that contains the following: byte data[3]; // pulse the clock pin 24 times to read the data for (byte j = 3; j--;) { for (char i = 8; i--;) { di...
asked by 16.10.2015 / 21:29
0
answers

How to convert wavelength to RGB?

Does anyone know of an algorithm that performs the conversion of a wavelength to RGB?     
asked by 30.10.2015 / 19:25
0
answers

Sending an echo icmp in C

I am studying the use of raw sockets and their operation in C language, but I was left with a doubt:    When I send the echo, I need to give value to the checksum of my icmp header that will send the same, I need to create this function so th...
asked by 02.07.2015 / 18:46