Questions tagged as 'c'

1
answer

Check for duplicate numbers and delete them

Enter the data in VET, and then check the repeated numbers, and leave in the VET1 only the numbers that are not repeated, but not able to do that last part at all, follow the code I have done so far: / p> #include <stdio.h> #include <s...
asked by 04.11.2018 / 02:04
1
answer

Calculate and display the Array in C (dev c ++)

I have to do this:    Make a program that loads a 12x4 array with the values of the   store, where each row represents one month of the year and each row   column represents a week of the month. Calculate and show;       the total sold in...
asked by 26.10.2018 / 22:21
1
answer

Vector returns address at the time of "printar"

* Código antigo #include <stdio.h> #include <stdlib.h> #include <locale.h> main(){ setlocale(LC_ALL, "portuguese"); int n1[4], n2[4], ni[4], nd[4]; printf("1° pessoa\n"); for(int i=0; i<=4;i++){ pr...
asked by 30.10.2018 / 02:48
1
answer

printf being duplicated after the first loop

I have this program and in the first loop of the while it runs normally, printa only once each thing, but in the second loop it printa "Type S to vote, N to see the calculation of the votes and leave." twice before reading. Can anyone tell me wh...
asked by 28.10.2018 / 17:38
1
answer

Separate a single string into an array of strings [duplicate]

In this code I'm trying to make a string read and then put each space-separated word in an array of strings. I saw that in some cases the strtok function is used, but since I intend to use these strings for other functions, I do not know how t...
asked by 19.09.2018 / 22:39
1
answer

Problem with changing positions in vector

Good morning! Using C ++ Dev, I'm doing the following problem in C:    Make a program in C that reads a vector of 20 real-type positions. Change 1st place with 11th, 2nd with 12th, 3rd with 13th, ... 10th with 20th.   the modified vector....
asked by 14.08.2017 / 17:57
1
answer

How to recognize the data type entered - C [closed]

I'm doing a program where the user can register, fetch and remove clients. To enter it type "insert [client name]" and a code is generated automatically. I have a problem with the search function. Currently the user has to type: "find x y" where...
asked by 17.07.2017 / 12:50
1
answer

C file explorer script

Good evening guys. I need to implement a C program that works like a file explorer system .s. The program should allow you to explore computer locations by ADVANCING and RETURNING directories and dynamically creating a data structure in memor...
asked by 11.11.2015 / 01:36
1
answer

Doubt with bool in C

Well, I did this test with vectors, but I'm having a problem with bool, which never fakes and displays the message not found. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> int main() {...
asked by 24.05.2017 / 22:14
4
answers

Problem using SetLocale in C

Everyone, good morning. I'm starting in C programming (I come from Python and JavaScript). I have a problem using the setLocale function, which defines the type of language used, allowing the use of accentuation and so on. When I put the func...
asked by 05.03.2018 / 00:39