Questions tagged as 'c'

1
answer

C: Sum between two numbers returns ASCII value or letter

Galera, I'm a C-language beginner, I'm challenging and I'm packing in a part of the code. #include <cs50.h> #include <stdio.h> long long n = get_long_long("Number: "); char card_number[15]; sprintf(card_number, "%lld", n); int le...
asked by 14.07.2018 / 01:05
3
answers

Conditional sex selector if

How would you do in this code to get the person's gender and display in printf() ? I've seen a lot of activities in the condition of if , if you used too many numbers and hit me a question: What if it was with letters? #inclu...
asked by 12.07.2018 / 01:36
1
answer

Error code repeating values in threads?

#include <pthread.h> #include <stdio.h> void *Operacao(void *soma) { int n; printf(“Digite o primeiro numero:”); scanf("%d", &n); printf(“Digite o segundo numero:”); scanf("%d", &n); printf(“A soma e:%d”, n + n); pthread_exit...
asked by 06.05.2018 / 03:35
1
answer

I need help with this competitive programming question

I am asking the question Low Frequency I have already tested the Udebug cases but the judge online only returns me Runtime error, by what I know when this happens and when it tries to use memory location that was not allocated, however I have...
asked by 24.06.2018 / 15:52
1
answer

How to install the freeglut library in dev c ++?

Can anyone help me? How do I install the freeglut library in devc ++? Next semester will have computer graphics in college and I can not install the freeglut library to help me in game development. What I have so far is a folder called freegl...
asked by 24.06.2018 / 20:20
1
answer

Change the size of the vector during the program?

I want to resize the vector to solve this problem "The Legend of Flavious Josephus": link If I have 5 people with a jump of 2 it will look like this: 12345 - > 2 and 4 died and in the next cycle, the 1 and 5 die. 135 - > I want...
asked by 23.08.2018 / 15:42
2
answers

How to add functions in C programs?

I need to know how to enter functions in any program. If anyone can give me an example in this program here, maybe I can apply on others as well. I need to understand the logic of how to apply the functions. #include <stdio.h> #include &...
asked by 17.04.2018 / 07:24
1
answer

How to access a database using C [closed]

I would like to know if you have any way to access a database in C?     
asked by 27.04.2018 / 03:56
1
answer

How to read an integer without limit of digits in C [closed]

Have some way to read a keyboard integer without digit boundary control. Type I need to pass a giant number via keyboard to a variable and then pass all the digits of that number to the ones in a list. Any suggestions?     
asked by 08.03.2018 / 02:01
1
answer

renaming file with posix c

I have a file called TempFile.txt I made the following script in c to rename file receiving the name of the file to be renamed and the new name, but it is returning this error: Error renaming file: Bad address         Output new name: The...
asked by 07.03.2018 / 22:42