Questions tagged as 'c'

1
answer

How do I show odd and even numbers of a C array? [closed]

The program consists of an array of 10 numbers, and I ask for a number, if that number is tango to show all the even numbers of the array and its average, and if it is odd, the same, how can I do it only using?     
asked by 08.09.2018 / 00:32
1
answer

Recorded data from pointer are deleted alone

This question is about C, pointers and gcc. My program writes the number 10 in 5 positions adjacent to the address pointed by the variable num. Apparently those 10's are recorded correctly but only for a while. When I do the second FOR and try t...
asked by 12.09.2017 / 22:39
1
answer

List loop error

The function of bottom of all, extra , does not work correctly, before reaching the first if after while the program closes me. What can be wrong? #include <stdio.h> #include <stdlib.h> #include <string.h>...
asked by 26.04.2018 / 20:29
1
answer

separate words entered in a char

I'm doing a few exercises in which I have to compare words from a string of characters entered by the user, in an exercise I have to see how many times a word is repeated in the whole chain that the user entered and in another exercise I have to...
asked by 24.03.2017 / 20:52
1
answer

Convert pdf to a txt in C language [closed]

My idea is to be able to read a pdf and then create a txt inserting line by line the pdf text, without images or anything like that, but I want to do it purely in C (not c ++) and I can not find any library that is moderately far easier since I...
asked by 21.07.2018 / 23:07
1
answer

Fill a 5 x 5 matrix using only one for C / C ++? [closed]

Does anyone know how to fill a 5 x 5 matrix only using a for?     
asked by 05.09.2018 / 05:41
2
answers

I get the salary but not the name of the two employees

The exercise consists of making an employee-type structure that contains: namemployed sex salary and take out on the screen the name of the two employees with the highest and lowest salary. The output must be:    How many employ...
asked by 11.04.2018 / 12:57
1
answer

Supermarket simulator C

I have a problem with the following code. The exercise tries to simulate a row that has random number of people passing through three boxes, when a box is empty an element is removed from the original row and goes to box C1, C2 or C3 and once th...
asked by 22.10.2017 / 20:07
1
answer

how to separate number in C [closed]

I wanted to ask if anyone can think of how I can show a number that I receive per ticket, for example if I receive 2354, how can I show it like this: 2 3 5 4. Separated by spaces thanks in advance     
asked by 10.06.2018 / 02:24
1
answer

Function getchar () reads only the first letter

#include<stdio.h> #include<stdlib.h> #include <string.h> FILE *fd; void agregar(int nombre_articulo, char direccion[]); int main() { int respuesta, c; int nombre_articulo; char direccion[] = "C:\Users\ploo\OneDrive\E...
asked by 03.01.2019 / 17:48