Questions tagged as 'c'

1
answer

How to encode and decode base64 strings in C?

I need to encode (and decode) a JSON to be transmitted from the web to a microcontroller. The% w_that I am sending is encrypted with JSON , but cyphertext contains unprintable characters and I have some problems with this. For examp...
asked by 01.09.2016 / 04:55
1
answer

Segmentation fault: branch and bound in c

I'm having a persistent error in my code. My goal is to find the path in a maze mounted on an array with an algorithm of type branch and bound . Here is the code: FILE *ent; FILE *saida; int NL; int temp; char c; struct labirintos{ int **...
asked by 24.02.2015 / 02:52
1
answer

How to use build options in Ideone?

Yesterday when responding to this question wanted to test it on Ideone, while running the code I received this error:    prog.c: In function 'main':   prog.c: 12: 9: error: 'for' loop initial declarations are only allowed in C99 or C11 mode...
asked by 28.04.2015 / 15:42
1
answer

Special treatment for string, why?

I know that arrays are static elements used when you have a pre-determined size that can be used. But speaking of initialization, when the size is already set next to the array, I would like to know, essentially, why you can not use other types...
asked by 21.05.2015 / 15:12
1
answer

How is the linux kernel or programs written in C tested?

When we use Java language, we use JUnit to test the codes. But the codes written in C, like the Linux , how is it tested?     
asked by 23.03.2015 / 20:41
2
answers

How to send a SOAP in C?

How do I send a SOAP in C? I have a Web Service that consumes SOAP and I have to send this SOAP in C. How can I do this? Is there an API or do I have to create a library?     
asked by 06.03.2015 / 15:38
1
answer

Reversing each line of a file in C

I'm trying to make a program that basically strings each line of a text file in reverse order, that is, the line is shown from end to end. For example, the line 'hello world!' is displayed in the form '! dlrow olleh' So far I have this code d...
asked by 07.06.2018 / 21:19
1
answer

Is there any way to assign values to a vector faster?

For example, I have the declaration of the following vector: float vet[3] = {1, 1, 1}; I would like to change all values of the same one at a time, without having to change one by one element or create a new vector and assign to it: vet[0...
asked by 10.11.2016 / 14:50
1
answer

How to use GOTO in C to implement finite automata?

This is my first time using goto in programming and I made a simple code here to try to implement automato (it should have much better modes), however my code is crashing at the time of execution, I do not know if it is a bad use of GOTO...
asked by 13.02.2016 / 17:51
2
answers

How to debug C programs from the Command Prompt?

I need to debug an algorithm in C but the machine I'm using does not have Code :: Blocks. What is the path for me to debug in the Windows Command Prompt?     
asked by 16.02.2016 / 04:00