Questions tagged as 'struct'

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
3
answers

Struct Strings Read with scanf Giving Wrong

Good luck, I'm developing a C code that performs data registration on files. However, I have a problem with the registerCustom function, which you will see below between the codes. Client struct: typedef struct { int idCliente;...
asked by 29.05.2018 / 02:10
1
answer

Pass values by reference C

I have to make a program with a menu of options that allows me to read a student's information, write the name and the phone after entering their student number and determine how many students are older than an age entered by the user. The progr...
asked by 15.02.2018 / 17:39
2
answers

Vector size in C

I'm new to the C language and am having trouble determining the size of struct-type vectors. Example. I have a category-type structure with three types of variables 1 int and 2 char. #include <stdio.h> #include <stdlib.h> stru...
asked by 04.02.2018 / 03:32
2
answers

Definition of Struct in C

Hello, my teacher made the following definition of some structs for a code from a list in data structure, but unfortunately I can not understand the definition of each struct itself. typedef struct{ int Chave; }TipoItem; typedef struct Tip...
asked by 06.12.2017 / 01:59
1
answer

How to transform into a lowercase a value of a struct?

The next function should turn variables into lowercase and then compare them. I've tried converting before, but also bugou . Arithmetic use of pointers next to variables of struct . Pointer points to struct . How to fix the error...
asked by 02.11.2017 / 04:01
1
answer

Program in c showing output, strange different from the value of the variables

I have a problem executing a program in ec and when I compile it and execute it it shows me a value that is not defined in my variable I'm thinking it's some bug with ide or something related to the buffer I'm going to leave a screenshot for you...
asked by 26.08.2017 / 14:39
2
answers

I'm having trouble reading a string inside a function

Good night, I would like to know methods to read a string in C (Version C99), I already tried a lot, and it does not work, below, the defective code. Note: The error I am reporting is that shortly after pressing "ENTER" on the first 'gets'...
asked by 05.07.2017 / 00:26
1
answer

preecher array, struct in C?

How do I fill leds and seq without needing a for loop? int main() { struct ledvalue { int seq[10]; int leds[10]; }; struct ledvalue numbers; numbers.seq={0,1,2,3,4,5,6,7,8,9}; numbers....
asked by 11.03.2017 / 01:40
1
answer

Doubt in code C data structure

Good afternoon, well I'm here to see if anyone knows why my code is printing a memory garbage, when it executes it shows what I want but printa trash of memory, if anyone knows why I thank #include <stdio.h> #include <stdlib.h&g...
asked by 08.03.2017 / 19:48