Questions tagged as 'c'

1
answer

How to count how many elements an array has?

I have a array of 10 positions that is filled by a function, ARMultiEachMarkerInfoT marcadoresVisiveis[10]; Always before adding elements to array , the function clears all elements and populates again. I want to know the best...
asked by 27.04.2017 / 15:27
1
answer

Use of% in variables

I can not understand what this symbol is for in a variable, I see its use in some points in SQL code, Shell Script, C. What is the use? For example a use of this symbol in Shel Script: DATA=$(date +%H) The variable DATA receives t...
asked by 14.05.2017 / 18:54
3
answers

Convert Fractional Decimal to Binary

I'm trying to convert a fractional decimal number to binary. Let's go to the example, representing, in binary, the number 0.625.    0.625 x 2 = 1.25, so the first fractional house is 1. It remains to represent the remaining 0.25 when r...
asked by 24.03.2016 / 16:02
1
answer

Understanding the concept of export symbols in shared libraries

I'm reading about this concept of exporting elements out of a shared library (DLL or OS). I'm reading this existing publication on the GCC Wiki. The last example of the publication is this: // Generic helper definitions for shared libr...
asked by 20.03.2016 / 20:02
2
answers

Saving some elements of an array in another array

I have defined an integer array in which it will be pointed to by a pointer and then I have another array that will store only a few numbers in which are even numbers. code ... void main(void) { srand(time(NULL)); //vetor de dimensao...
asked by 12.11.2015 / 15:18
1
answer

Questions about Recursion in the MergeSort function [C]

I have a question about recursion. In fact, I'm not understanding the workings. Come on! I have the following function: void MergeSort (int *V, int inicio, int fim) { int meio; if (inicio < fim) { meio = floor ((inicio + fim...
asked by 17.11.2015 / 11:40
3
answers

How to receive input data in C until you have no input?

The deal is as follows: How to receive C (integer) entries until "ENTER" is pressed? In my program, the user should enter a list linked in the following format: num0 num1 num2 num3 num4 num5 num6 num7 num Ex. list: 19 8 9 14 15 9...
asked by 24.11.2016 / 21:28
1
answer

A variable without assigning value accesses the value of variable in another function

I have a Programming Language activity to do, whose code is done in C language, and in this question, the question is:    What will be the return of this code and why? I did not understand why one function got the value of the variable fr...
asked by 09.06.2016 / 17:22
1
answer

Store data in STRUCT and print data on screen - 3 people

Can anyone tell me what I'm doing wrong? I need to store the data of 3 people in struct and then print it. This error is appearing:    request for member 'name' in something not a structure or union   request for member 'age' in someth...
asked by 17.09.2015 / 17:26
1
answer

Clang presents character error too large but Visual Studio compiles normal

I'm having trouble understanding why clang presents the error message    character too large for enclosing character literal type when trying to run the code: char c = 'ç'; While Visual Studio 2015 compiles seamlessly. I know that di...
asked by 24.06.2016 / 23:08