Questions tagged as 'c'

4
answers

recursive superfatorial problem

I'm having a question about how to do this recursive math function. Calculation of the superfatorial: The super-factorial of an N number is defined by the product of the first N factorials Thus, the superfatorial of 4 is sf (4) = 1! * 2!...
asked by 07.09.2015 / 17:11
2
answers

What is the purpose of the size_t and ssize_t commands in C?

What is the purpose of the size_t and ssize_t commands? What kind of data do they represent? size_t minhavariavel1; ssize_t minhavariavel2;     
asked by 16.12.2015 / 01:21
2
answers

What is sscanf () and sprintf () used for?

What is sscanf() and sprintf() ?     
asked by 13.10.2018 / 22:07
2
answers

Almost prime numbers

I have a question in C, I know if a number is cousin, but almost cousin do not know .. how do I do? Follow the part of the code working! However, just checking to see if it's cousin .. the almost cousin does not spin // quasePrimos.c // /...
asked by 12.09.2017 / 19:49
1
answer

How to get the maximum / minimum value of an integer in the C language

Speak up! Is there a function in language C that takes the maximum / minimum value of an integer?     
asked by 06.03.2017 / 05:56
2
answers

Error declaration null - Unknown type name 'bool'

The error you are giving is in this function. bool tem_numero_na_lista(tipo_lista * aux, int valor) { while (aux - > prox != NULL) { if (aux - > info == valor) { return true; } aux = aux - > prox; else {...
asked by 18.04.2017 / 16:31
2
answers

One character length (ASCII vs. other encodings) in bytes

Viewing this question came up with a question, coming from PHP and in the past having "problems" derived from character encoding, eg: srtpos " vs mb_strpos , I knew that all characters ASCII have 1 byte, but I thought that speci...
asked by 19.01.2017 / 12:11
3
answers

Problem with program that prints three numbers incrementally

I'm having trouble creating decision structures in a program that reads 3 numbers and prints them incrementally. My code that is going wrong is as follows: #include <stdio.h> int main (void) { int A, B, C; scanf("%d %d %d" ,&am...
asked by 27.03.2015 / 02:21
2
answers

Problems with calculation of "TREE OF LIFE"

Good afternoon, I have a problem I need to do the following: Create a program, in C language, that calculates the size of the tree of life, after a certain number of growth cycles, taking into account that the tree starts with one meter in si...
asked by 21.06.2016 / 20:12
1
answer

How to return or extract more than one value from a function?

integerPower( int y ){ int base2; int base3; int base4; int total; base2 = pow( y , 2); base3 = pow( y, 3); base4 = pow( y, 4); When I call this function (I did not type return because that's the question) I...
asked by 13.12.2016 / 00:44