Questions tagged as 'c'

1
answer

warning: unused variable 'a' [-Wunused-variable] in arrangement

The program has to show the number of elements that make up the array compiles and gives the result well but this warning appears warning: unused variable 'a' [-Wunused-variable] The error may be due to the fact that the arrangement is not...
asked by 08.10.2018 / 18:16
1
answer

Segmentation fault with matrix assigned by strlen

I want to create the César cipher, also known as offset encryption, caesar.c with C. I receive the number in the variable as an argument ./caesar 2 for example. I use it in key . In an array of String s I receive the t...
asked by 31.05.2016 / 15:40
1
answer

How to convert a for from C to python, "It has to be programmed in c"

I'm totally new to C and I need to send it to call a .txt and identify where a For is found, once that is identified for converting it into a python language example: My txt will have the following: #include <stdio.h> int main() {...
asked by 02.12.2017 / 21:54
1
answer

Show and modify files

#include <stdio.h> #include <stdlib.h> FILE *fd; int main() { int c; char direccion[] = "C:\Users\ferneicito\Desktop\Programa\hola.txt"; fd = fopen(direccion, "a+"); if (fd == NULL)...
asked by 07.12.2017 / 20:51
1
answer

Reference to main without defining

When trying to compile the following code by command line, it returns the following error:    "/ usr / lib / gcc / x86_64-linux-gnu / 5 /../../../ x86_64-linux-gnu / crt1.o: In the function _start ': (.text + 0x20) : reference to main 'undefi...
asked by 21.10.2017 / 20:36
1
answer

The console freezes at the keyboard input using getch ()

Why does not this code work for me? I do not see where the fault may be, I know that the conio library is not standard, but anyway it should work ... #include <stdlib.h> #include <conio.h> int main() { char password[10];...
asked by 17.02.2017 / 18:14
1
answer

Hangman Program in Qt

Could you help me and tell me what is wrong with the following exercise and how to improve it? The statement is:    In this exercise we will program the game of the simplified hangman. At the beginning we will ask the first player for the...
asked by 13.10.2016 / 20:14
3
answers

Not to show repeated letters

I want to go through the word and iterate over each of its letters. If it detects that it has already been printed, and does not show the letter (with the help of an auxiliary arrangement), my problem is that I do not know how to carry it out. -...
asked by 25.06.2017 / 20:12
1
answer

Labyrinth recursive algorithm

Good, I am faced with a recursive problem to find the exit of a labyrinth in a bidimensional matrix. The legend of this labyrinth is: 'E' = entrada 'S' = salida '#' = pared ' ' = camino The idea is that the program marks a path that goes fr...
asked by 09.05.2017 / 17:17
2
answers

The counter does not work in c

I present my problem, I have this struct: typedef struct { char nombre[20]; unsigned int dni; tfecha nac; }tperfil; typedef struct { int d, m, a; }tfecha; of which I have an array of the same and the idea of the counter is...
asked by 06.01.2017 / 17:11