Questions tagged as 'c'

1
answer

C-Cryptography

I'm developing a C program that will be able to encrypt and decrypt texts and save them to disk separately. I want to use the ASCII table for the implementation of Encryption, I am able to encrypt but at the time of reversing the text I am ha...
asked by 25.06.2018 / 00:24
1
answer

Change value of two variables without using a third, using only sum or subtraction [closed]

Using only two variables (A and B) and also using only (addition or subtraction), make the value of A become the value of B and the value of B becomes the value of A.     
asked by 27.02.2018 / 17:39
1
answer

Structs in C can have constructors?

I have the following structure within a program: struct STR00034ST{ char C_O010XC14B, C_O020XC14B; short S_0010XI15C; float F_0010XI1D; STR00034ST (char _C_O010XC14B, char _C_O020XC14B, short _S_0010XI15C, float _F_0010...
asked by 19.02.2018 / 10:03
2
answers

Download multiple images at once from a site in php

Next, there is a site where I need to download several images, I can access the image as follows: url.com/get_img.php?user=VARIÁVEL where variable is replaced by an integer and it returns an image in PNG . I need help finding ou...
asked by 18.02.2018 / 02:29
1
answer

Convert function from recursive to iterative

I have a merge function of linked lists working. However, recursion is being used and I would like to change the code and make it iterative. But I did not succeed. Follow the code: struct Node { int data; struct Node *next; } struct No...
asked by 22.04.2018 / 03:57
1
answer

double free or corruption (out) - Dynamic Allocation in C

In the discipline of Data Structure in the faculty, as an exercise, was passed the implementation of an algorithm that generates the transposed matrix of a given dynamically allocated matrix. I made the implementation and the algorithm is working...
asked by 30.03.2018 / 19:49
1
answer

Determine the position where the highest value increase occurs in an array

I'm doing the following exercise in C language ImadethefollowingcodeandIdonotunderstandwhyitisnotworking...intmaior_subida(int*tab,intdim){inti,pos=0,diferenca=0,diferenca_anterior=0;for(i=0;i<dim;i++){diferenca=((*(tab+i+1))-(*(tab+i)));if(...
asked by 31.03.2018 / 02:24
1
answer

Problems with Decode and Arduino

Hello, People I have the following code in Arduino if((digitalRead(4) != 1)||(digitalRead(5) != 1)) { Serial.print("\t"); Serial.print(analogRead(A0)); Serial.print(","); Serial.print(millis()); Serial.print(...
asked by 17.04.2018 / 05:38
1
answer

How to store value of a function that returns a char pointer in a string vector

I would like to know how I can store the return of the function below, which generates a random string, into a vector of strings with 100 of those words generated by the function, then to do an ascending and descending ordering in the vector. c...
asked by 18.01.2018 / 19:04
2
answers

Test the same as the question but is giving error

I decided that 2018 would learn to program, and I'm studying on my own, and researching found this judge called uri, I'm having trouble finding the error that has in my code, I did all the tests, and when I send the question only 10% error could...
asked by 24.01.2018 / 15:10