Questions tagged as 'c'

2
answers

Static Library

I created a static library in C , that is, after compiling the file .c , generated a file with .a extension. In the file .c I implemented some functions. How could I read this lib in another program and call a function...
asked by 10.07.2015 / 16:49
2
answers

Segmentation Fault (core dumped): array reading

I have a problem with reading an array that produces the error    Segmentation Fault (core dumped) This is just the beginning of code development, but it already has an error after reading the first element of array . #include <st...
asked by 22.03.2015 / 14:55
4
answers

C-Factor Algorithm

I need to create a program in C that fills any number that the user types. I wrote this code, but it does not work fully because it calculates only once. I do not want a ready answer, I want an explanation, why that happens. #include <stdio...
asked by 13.06.2014 / 16:17
1
answer

How do I rewind the file pointer correctly in Java?

In reality the problem is quite complex, but I will try to give a notion that I think will be understandable. I have a method in an application that initializes objects to I / O in accordance with a "global context" (in fact this is a concept...
asked by 14.06.2014 / 08:05
1
answer

How to encrypt a pendrive in C?

First of all, I have a security idea, and to put this idea into practice I would need to learn how to encrypt a USB stick. The idea is that the pendrive works as a 'key', and at the same time this pendrive can not be easily accessed (hence th...
asked by 18.08.2016 / 15:36
2
answers

How to move, rotate or scale an object on its local axis in OpenGL?

Hello, I have a HTransform class that stores an array, position, orientation, and scale for each object, this class is the base class of each object or entity. I made a function to move the objects and another to update the array when the...
asked by 02.04.2014 / 01:22
3
answers

C File Registration

How to tell if there is a record (struct) saved in some position in a file in C? For struct : typedef struct Registro { int chave; char caracteres[20]; int idade; int prox; bool contem; } Registro; For exam...
asked by 15.05.2014 / 21:50
2
answers

Comparison of strings in C

I am trying to do an exercise that tests if there is some blank before a string and removes it if it does, however it is returning the following error:    Targeting failure (recorded core image) I can not understand why. Code: #inc...
asked by 19.11.2018 / 00:08
2
answers

How to play an audio in Language C

If you can help me, I am doing an Electronic Ballot in the C language, I would like to put that voting noise after a person votes. I already have that sound in .mp3 and .wav format, how do I reproduce this sound after a vote? Do you have any...
asked by 30.11.2016 / 10:55
3
answers

Program using malloc twice

Because this program, which divides a number into decimal notation, transforms it into binary notation and prints the number in the correct sequence (from the most significant to the least significant bit ). uses malloc twice? #include...
asked by 16.04.2015 / 02:56