Questions tagged as 'c'

1
answer

Polish calculator algorithm and pointers

I have a small problem in terms of pointers to use the inverse Polish calculator algorithm. Here I share the code: //Dado un arreglo de caracteres que representan las componentes //de una expresion en notacion polaca inversa, evalua dicha //ex...
asked by 02.10.2017 / 03:56
1
answer

Read the next item in the list

I have this program that does not throw an error, but the visualization procedure only shows the first item in the list. How do I continue printing the following list items? #include <stdio.h> #include <conio.h> #include <window...
asked by 05.10.2017 / 22:08
1
answer

Length of an array and pointer in c

char *nombre_carrera[] = {"perro prueba0", "perro prueba1", "perro prueba2",...........}; How can I know the length of the arrangement to know how many perro prueba there is? I used strlen(*nombre_carrera) but it gives me the...
asked by 28.08.2017 / 03:52
1
answer

++ in front of variable inside of a while - Language C

int bandera; while (++bandera != 1) { bandera--; } I do not understand the code of ++bandera != 1 . Does it mean that +1 is added to the flag and then fixed if it is different from 1?     
asked by 25.09.2017 / 06:05
1
answer

Help with these binary files in C

I have two binary files made in C , one to write and one to read, when executing the write program I think it's all right and I save it in the file, but when executing the reading I get symbols and rare characters .. Here the code of both:...
asked by 01.08.2017 / 11:56
1
answer

how to do a random array counter in C

good, the program consists of making a series of rolls N of a dice and counting the number of times a number ordered by screen. This is the code I have made but something is wrong with the counter :( Thanks in advance. #include <stdio.h>...
asked by 06.11.2017 / 19:57
1
answer

warning: control reaches end of non-void function [-Wreturn-type]

in this function is giving me a warning when compiling, to what is it? I read that it is when you declare an int function and it does not return any value, but in this case my function is void, so I do not understand the error. void *ATERRIZAR...
asked by 13.06.2017 / 09:58
1
answer

Stacks a file in C

I have thought to pass the data from a stack to a binary file, I have done a few steps but I think they are wrong, I see the last element element introduced, I mean the first one in the stack. Code: typedef struct nodo { int dato; s...
asked by 04.09.2017 / 22:14
3
answers

Choose how many decimals I keep in a variable

Greetings, I'm trying to get some concrete decimals saved for comparisons later. Would it be possible to have a decimal with, for example, 8 decimals? Thank you!     
asked by 14.05.2017 / 20:29
2
answers

Esc to exit, Any key to start c ++ / c

I remember seeing in a random videotutorial that the boy used in his code "Press any key to start the execution, Esc to exit" and I used to think something with a tag called getch or similar, I must implement that in my project and That is one o...
asked by 26.05.2017 / 22:26