Questions tagged as 'c'

1
answer

How to delete a file (not txt) in C?

I'm creating a program that puts each student's grades in a different file. The user puts the code of the student and this code turns the name of a file that is not txt (I do not know how does it do txt). But I'm not able to delete this file. Fo...
asked by 22.07.2018 / 23:28
1
answer

Union of vectors, without repetitions in C [duplicate]

The statement follows:    Read two vectors of X and Y integers, each one with 5   elements (assume that the user does not report repeated elements).   Calculate and show the resulting vectors in each case below:       Sum of X and Y: sum...
asked by 19.07.2018 / 03:56
2
answers

Problem in checking with IF in C

I need to tell you if the person is approved or disapproved. For concept D and frequency greater than 75 is appearing approved but was to be disapproved. #include <stdio.h> #include <conio.h> #include <string.h> #include <...
asked by 31.10.2018 / 23:43
1
answer

Decrement, increment and sum of pointers in C

When I try to add the last pointer over 15, it repeats the third-to-last pointer and does not add the pointer *ptr_xi to it with a further 15? int xi; int *ptr_xi; void imprimir() printf("valor de xi = %d \n", xi); printf("v...
asked by 14.07.2018 / 04:52
1
answer

Calculate execution time of a sorting algorithm in C

I'm having a question about how to get the runtime only in the sort algorithm. I spun a lot on the internet and found a lot of superficial, nothing that would help me in what I need. I have an issue where I have to analyze the time the algori...
asked by 13.07.2018 / 04:57
1
answer

Stacks with vectors in C, is showing elements that have already been removed

How do I show my vector without the numbers that were removed? Because when I show him, even removing a number in the function, it still appears inside. #include <stdio.h> #include <stdlib.h> #define MAX 10 int pilha[MAX]; int ini...
asked by 16.08.2018 / 03:23
1
answer

Is this code fragment redundant?

Recently I did a C test where I had to complete a code to remove items from a queue, follow the code with the correct answer highlighted: typedef struct No { int dado; struct No *proximo; }; typedef struct Fila { struct No *inicio; st...
asked by 14.08.2018 / 14:53
1
answer

How to edit data in a Struct using a function

I want to create an edit function that receives as a parameter by reference the vector of songs. (using pointers) The user must choose the number of the song and re-enter the data of that position of the vector. I created the struct, I'm a...
asked by 08.07.2018 / 11:14
1
answer

How to calculate difference between dates using the time.h library

I saw that it has a function in time.h that calculates the difference between date I went to documentation link time.h , I did not quite understand how to perform this calculation, for example I wanted to calculate the difference between the da...
asked by 07.07.2018 / 22:02
1
answer

Read text file and store fields in variables

I need help with the following: I will make a b-tree to present a job in college, which consists of reading the data from a text file and passing it to the B tree. I will do it as follows: I created a struct with the data types (Batch, Plate, UF...
asked by 30.06.2018 / 01:18