Questions tagged as 'c'

1
answer

Doubt with functions in C

How do I make the variable I used to store value that I read in the scanf, be passed to the function I created? Ex: #include <stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); } int soma(int a, b){ int soma;...
asked by 09.06.2018 / 19:41
1
answer

How to remove a struct stored in file in c?

I do not think I explained well in the title I have a calendar code where I can add contact, edit, list and get stored in an agenda.txt file I'm just having trouble removing a contact that was previously added Code: #include <stdli...
asked by 07.06.2018 / 17:32
0
answers

Problems deleting certain element from a list within another linked list

I'm having a problem removing an element, I have a function that is responsible for deleting the element within doubly chained lists. How does it work? In the main function is called the name of an element (movie) in which to remove. T...
asked by 01.07.2018 / 18:41
0
answers

(c) Sort Matrix of Structs

Good to all! I have a problem that I can not solve and I seek help from members. In my code, I read the contents of a file and save it in a string for use in the code, in the main loop, I get this string and refer to the function call BreakSt...
asked by 01.07.2018 / 18:43
0
answers

Functions in File C

I'm doing a job that lists players and performs some functions using File in language C and I need the program to list in option 2 the player by name and in 3 by the shirt number. My code so far: #include <stdio.h> #include <...
asked by 28.06.2018 / 02:24
1
answer

buffer is not cleared during second run of the cycle

During the second execution of the for loop, setbuf did not work, and if the 2nd product had more than 14 characters, it assigned the remaining characters to the next positions. #include <stdio.h> const int MAX=5; const int QCH=15; i...
asked by 30.05.2018 / 02:11
2
answers

How do I display the values of a matrix one by one in C? Example: Line 1: 1,2 Line 2: 3,4 Line 3: 5,6 "" "" "" "" ""

example: linha 1: 1,2 linha 2: 3,4 linha 3: 5,6 " " " " " " " " " " follow what I've done so far: #include <stdio.h> #include <math.h> #define max 50 int main() { int m_linhas,n_colunas,matriz[max][max],i=0,j=0;...
asked by 30.05.2018 / 02:05
1
answer

Check if a string is contained in another without the string.h library?

I need to check if a string is contained in another and returns the position where the first letter appeared. I saw the following code here on the site, however I can not use the string.h library. include stdio.h include string.h...
asked by 15.06.2018 / 22:59
0
answers

The remove () and rename () functions do not work!

Hello, I'm doing a program in has a part of it that should delete a client and the data of such that they are in a .txt file! until that's fine, I create a new file with a different name that copies all the clients that were in the other file, mi...
asked by 14.06.2018 / 03:12
0
answers

Problems in code in C List chained

I have a problem with a code in C. I'm trying to open a txt file that has movie name, year, actor, ... And I'm putting the movies on a threaded list. The problem is when ordering the movies in the list, I tried to do by the bubble sort method bu...
asked by 26.05.2018 / 02:40