Questions tagged as 'c'

2
answers

Loop to perform calculation in C Pagerank

Based on starting notes 0.15 for everyone and then add note as explained in link If we consider pages 1, 2 and 3 to be: 1: link1 2: link2 3: link3 The paginas.txt file for this example would be: 1 link1 2 link2 3 link3 While the...
asked by 30.01.2014 / 13:13
2
answers

How do I correctly access elements of a dynamic array via pointer?

As many know (I believe) a multidimensional array is stored in memory in a linear fashion, ie each row of the array goes into memory one after the other. For example, I created the following image: Soyoucanmanipulateamultidimensionalarrayasi...
asked by 08.06.2018 / 03:27
1
answer

Average is not calculated

I need to write a code that reads only 20 integer values, in the end add the positive numbers and average the negative numbers. It usually sums the positives but when it arrives at the time of the negatives it always shows the value 0. Her...
asked by 31.08.2018 / 23:43
1
answer

Optimize factorial calculation using vector

Issue statement:    Read an array A of the vector type with 5 integer numeric elements.   Construct a matrix B of the same type, each element of matrix B being the factorial of the corresponding element of matrix A.   Display the elements of...
asked by 10.12.2017 / 20:43
1
answer

Play Sound (WINDOWS)

How do I play sound in a program developed in the C / C ++ language? Environment (WINDOWS)     
asked by 13.05.2015 / 19:19
1
answer

Remove and re-insert vowels in any sentence, C

Context: I am trying to develop a code that is able to remove all the aeiou vowels from any phrase and save the position that was the vowel in the sentence so that it is possible to reconstruct the phrase again using what was saved as a...
asked by 18.06.2017 / 17:18
1
answer

Parameters of the scanf function

While studying the scanf function with a little more depth, I had a question about the arguments I put before% when reading a string, that is scanf("argumentos...%s",minhastring) , in the following codes I add a space and the ' J 'b...
asked by 27.06.2016 / 03:15
1
answer

How to access the indexes of a very large vector in C?

I have a problem that I have to mount a vector ( vet2[50] ) with the sum of a large vector ( vet1[100] ), this vector vet1 is provided by the user and the sum is given by: vet2[0]=vet1[0]+vet1[1] vet2[1]=vet1[2]+vet1[3] . ....
asked by 09.10.2016 / 16:01
1
answer

Is it possible to "simulate" C ++ Templates in C?

Taking a data structure of type stack with array for example : typedef struct stack_s { int top; int item[STACK_MAX_SIZE]; } stack_t; Doubt appears when for some reason I want to use a stack with a data type other than int...
asked by 15.10.2016 / 18:04
1
answer

How to make an HTTP GET request for a web service with Arduino

With a request via GET for a web service with Arduino , using the following URL and passing a parameter
asked by 01.12.2015 / 13:29