Questions tagged as 'c'

1
answer

How to apply "goto" in quicksort? (c, c ++)

I'm doing a job for my college where I ask that a quicksort algorithm be done in C, using "goto" as much as I can. In the code below I applied "goto" to my knowledge, but I would like someone to help me apply "goto" to the rest of the algorit...
asked by 18.04.2017 / 04:16
1
answer

On the passing of parameters in compiled programming languages [closed]

What would be most advantageous when calling a function, putting it in the stack from right to left or vice versa? What about cleaning the battery? Does the calling function caller (or calee) have to be responsible for this? My two cents:...
asked by 10.12.2016 / 23:06
1
answer

Conditional error in C

When I moved in Python I remember that I could do a if if any assignment or operation returned error. Like this int v[]={1,2}; int v1; if((v1=v)==ERRO) //faça isso; Is there anything like this in C?     
asked by 26.06.2017 / 15:09
2
answers

Converting a vectorstruct in C ++ in C

I'm trying to adapt a C ++ function in pure C. I changed the names of the variables and structs because it is not the case. typedef struct struct1 { int a; int b; int c; string d; } STRUCT1; typedef struct struct2 {...
asked by 18.11.2016 / 00:44
1
answer

Can you capture type events when I press a key in C ++? [CodeBlocks]

Good morning, I'm doing an autoclick bot for personal use and I would like to add the function to pause the clicks when pressing a specific key but I do not know if this is possible in C ++ ... well, if someone You can help me thank you. obs Sou...
asked by 30.01.2017 / 12:37
1
answer

problem with reading files / sorting data in c

Hello, my problem is the following , in the topic created by Rafael. link About problem reading strings. String reading problem You asked about ordering the t-shirts in c and then had the reply from Rafael Bluhn. link Bu...
asked by 01.11.2016 / 14:34
1
answer

strcpy () in struct string

I have a struct Time that has a char name[30] vector, the problem starts when I try to copy a value to this string with the function strcpy() , it follows the code of stuct : typedef struct Time{ char name[30];...
asked by 31.10.2016 / 12:01
1
answer

Comparison of vectors in C

I'm currently trying to establish a comparison of two vectors in C. My code structure is as follows: int iguais(int *v1, int *v2, int tam) { int i, cont = 1; for(i=0; i<tam; i++) { while(*(v1 + i) == *(v2 + i)) {...
asked by 01.11.2016 / 10:01
3
answers

Error segmentation fault not able to identify

Hello, friends! I am creating a program that will read a text. This text should be allocated one line at a time (up to 75 characters per line). The program receives, at the input, the user's text until the string "the end!" is typed. Ho...
asked by 12.11.2016 / 20:35
2
answers

Function help to delete the repeated values contained in a double-chained List in C

I am not able to develop a function inside my code that removes the duplicate values within a double-chained list, could you help me? Here is the code I have done so far, the function I need to fix is retiraValor : #include <stdio....
asked by 04.11.2016 / 08:23