Questions tagged as 'c'

2
answers

Use of EOF in vectors

Good night, I would like to know if in this program I am using EOF (end of file) right, that is, as long as I do not type 0, the vector is being allocated and recorded with a value ?? Here is the code below: #include <stdio.h> #include &...
asked by 16.05.2015 / 05:49
1
answer

Linked list help main

I'm having trouble creating a main so I can test if my functions are correct. is a linked list program, does not need to have menu. #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <stdbool.h> typede...
asked by 25.04.2017 / 16:05
1
answer

Problems with Dev-cpp [closed]

I installed Dev-Cpp 5.5.1 and it shows an error like this when I try to compile:    "Failed to execute (and the file path)". Can anyone help me with this? I've tried version 4.9.9.2 and the same error occurs.     
asked by 26.03.2014 / 17:02
1
answer

Double-chained List Problem

My function - for now - can create a list and add items at the beginning or end of the list. However, when calling the add item function, selecting 1 or 2, and typing the item, the program simply exits. I can not find what the problem is, follow...
asked by 31.12.2018 / 05:54
1
answer

HELP IN C PLIS - I am trying to create an array in a function and return it fully populated, however in my code it returns null

#include <stdio.h> char * criar_matriz() { char *matriz[8][10] = {}; matriz [7][3] = "*"; matriz [7][4] = "*"; matriz [7][5] = "*"; matriz [7][6] = "*"; for(int i = 0; i<8; i++) { for(int j = 0; j<10; j++) {...
asked by 09.12.2018 / 04:58
2
answers

Problem with vector ordering in C

I'm trying to make this problem, but the result always goes awry.    "Make a program that creates a 10-position vector filled by the user. Scan the vector and whenever the value of the i-position of the vector is less than the value of the i...
asked by 29.11.2018 / 23:24
1
answer

Segmentation Error

Hello. Could someone help me with this error (segmentation fault)? I do not know why it's happening. #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct cel { char *palavra; int numOcorrencias;...
asked by 23.11.2018 / 13:40
1
answer

I can not compare the strings

I registered the client code and now I need to request again, so I need to check whether or not there is a registered code, but even if the codes are different, it says that the code has been registered. Issue: 3 - Calculate the value of th...
asked by 26.11.2018 / 23:00
1
answer

fgets not working

I am developing a code to encrypt in the cesar cipher. The decryption is working perfectly, but to encrypt, fgets does not expect me to type the text. I have tried everything, the only command that works is: scanf ("% s", & cif), but...
asked by 28.10.2016 / 17:27
1
answer

How to display the value of a query in C?

Remaining the question: I have a table in Mysql where I need to display the person's name as soon as they type their RG. I am making a code where I just try to do the search to see if it is fetching normally, but I can not display it on the s...
asked by 04.11.2018 / 22:37