Questions tagged as 'c'

1
answer

dynamic reallocation - struct array

I need to do an exercise in which the code allocates memory as needed, but I need to relocate an array of structs, but I ended up locking in that part. My Struct is: typedef struct{ char nome[100]; char endereco[100]; int numero...
asked by 23.05.2018 / 00:01
1
answer

How to improve the perfomance of a program by dividing the executions into processes in language C?

int main(int argc, char ** argv) { int i,j; uchar *image; camera c; point eye; point lookat; int samples; int s; float rcp_samples;// = 1.0 / (float)samples; //char fname[20]; //ray * rays; //color...
asked by 22.04.2018 / 00:43
1
answer

Specifying height and sex of students with a "while"

The exercise asks me to read 20 students and their respective heights and sex, and then show the average height and how many men and women we have. What I did was the following: int main() { float altura, media; char gen, mediam, me...
asked by 09.04.2018 / 15:15
0
answers

What is the bubble short error in this code?

   I tried to solve this problem of Online Judge URI and I got to this   code, and it works for test cases smaller than the problem, and   I already looked for the error, but I can not find it.   Code:#include<stdio.h>#include<stdl...
asked by 09.04.2018 / 05:06
0
answers

Why is the statement not being executed?

I am creating a program that sorts a matrix of structures, first sorts the rows and goes to each row and arranges them by columns. In the array that I am using at the end of two cycles the value of (i+1 = 4) , when I call again the functio...
asked by 28.04.2018 / 16:42
0
answers

CLion - Error executing or debugging code

EXPLANATION I'm studying dynamic memory allocation and made a simple program to solve the following situation: The client wants to make registrations of a certain number of employees and wishes to consult immediately. The program regist...
asked by 27.04.2018 / 04:30
0
answers

How to run the client-server test in C?

I'm studying the basics of networking and I need to run the following code to see how communication occurs. I compile both in the Linux terminal, but when executing nothing happens. Is it necessary to change something in the code, or pass som...
asked by 27.03.2018 / 02:01
1
answer

Problem with pointers - remove element in a binary search tree

You are having some problem in passing the root pointer per parameter to the remove_node This function is iterative, it has only one recursive call in the latter case. So you have to use two pointers. As we walk through the binary search t...
asked by 07.04.2018 / 23:35
0
answers

Get the Start Address of a thread from a process and terminate it individually

What I want to do is open up to check if a process is open, view the thread list, identify it by the Start Address, and end a thread specific to the process. I can do it manually by the processhacker, but I need a script for it. Itriedtomake...
asked by 17.03.2018 / 11:02
1
answer

How to pass a double pointer as an argument and return it from the C ++ function

I have a function that requires it to be void and that a double pointer is returned from it by the argument. void cracking::decompose(char input[][100], int size_S, double* &Atm, int* &ID, int &size_out); { vector<double&...
asked by 12.04.2018 / 19:38