Questions tagged as 'c'

3
answers

'else' error without a previous 'if'

I have a problem and I do not know how to solve it. The program in C that I developed is showing several types of errors and I do not know what could be: #include <stdio.h> #include <stdlib.h> #include <math.h> int...
asked by 03.04.2014 / 20:53
3
answers

variation of while with scanf

Good evening can someone tell me what this code snippet means, since net searching I did not find follows: while(scanf("%d", &variavelA) && variavelA ) Thank you for your attention     
asked by 07.11.2018 / 02:46
1
answer

Saving stream to a file

I'm having the following problem, when saving the struct, to position 1, ends up losing street, city and state value. I do not understand why this happens if in the following positions it allocates in a normal way, and the code to do such thin...
asked by 26.11.2014 / 14:42
2
answers

Calling function without signature knowledge [closed]

If I have a function called calculator () in C. And I want to call this function, obviously I would call it by the name, that is, by its signature. But if I do not know the signature of this function, and its signature is in a variable of type c...
asked by 12.06.2015 / 15:33
1
answer

Read the elements of a struct in another function

I need to access struct data in my CalcN function, how should I proceed? int main(){ int calcn(); struct user1{ string Nome; int Dnx; int Nxhu; }; struct user1 x; x.Dnx = 4; x.Nxhu = 3; int Resultad...
asked by 25.11.2014 / 23:28
1
answer

Sockets can be multilanguage?

Because sockets are a common choice for high-performance communication between cross-platform applications , my question is, does that also make them multilingual? Bringing the situation to my context, what could be the reason why a server-...
asked by 08.11.2018 / 15:39
1
answer

Prime numbers are not listed

I'm trying to create a C program that shows all prime numbers from 1 to 100 using brute force, but my program shows nothing on the screen. #include <stdio.h> #include <stdlib.h> int main() { int x=100,n=2,z=0; int p[z];...
asked by 17.11.2018 / 20:22
2
answers

What is the difference between c and c ++ [duplicate]

I'm starting programming and would like to know the difference between c and c++ and which one should I start to make studying easier.     
asked by 23.07.2015 / 16:19
1
answer

Increment and Decrement operators [duplicate]

Why it did not add the value of variable 1, with 1 more in the first printf. int numero = 1; printf("Conteudo armazenado na variavel: %d\n", numero++); /*(por que aqui da resultado 1? não estou pedindo para ele somar?)*/ printf("Conteudo arm...
asked by 07.08.2018 / 22:56
1
answer

How do I overwrite a string with an accent for another without?

I wanted to replace the accented characters with other ones without and generate a new string, but there seems to be something wrong in the comparison I'm trying to do in the extractAcento function. I looked at the ASCII table, but I still did n...
asked by 09.09.2018 / 16:52