Questions tagged as 'c'

3
answers

Convert "unsigned int" into "unsigned char" vector?

I need to convert a unsigned int to a unsigned char vector to later translate those addresses into binary, for a job that needs to simulate a virtual memory. Can someone explain me how to do this?     
asked by 24.06.2015 / 19:25
1
answer

What is the function of getch (); and the conio.h library?

What is the getch(); function used for? What is the library for conio.h; what is the utility? For example in a code type this: #include <stdio.h> #include <conio.h> int main() { printf("Hello world"); g...
asked by 12.11.2017 / 01:05
1
answer

Atomic Types in C language

What is the difference between primitive and atomic types? What is the purpose of atomic types? In what situations are they applied?     
asked by 24.08.2018 / 04:04
1
answer

.txt with password in C?

I'm messing around with .txt file manipulation and I was wondering how to create a .txt file with a password in C, so that this file can not be opened by Notepad or another program without the password. And then if I wanted to open the file I co...
asked by 27.08.2018 / 19:07
1
answer

Problems comparing two IPv6 addresses

I have recently been working on a number of "test-codes" to exercise the "head", specifically codes involving Unix sockets . The most recent code I wrote was a simple server that receives a new connection from one client every 2 seconds. The...
asked by 31.10.2018 / 05:53
1
answer

Are variables allocated randomly in memory?

In a book about C, in which I started studying variables, I would say that the variables were randomly placed in memory, for example: int a; int b; printf("a = %d\n", &a); --> 5000 (endereço) (%d ao invés de %p para simplificar) printf...
asked by 02.11.2017 / 22:16
1
answer

Lists chained in C

I have two lists in C, where you have to include several records in the list of customers, and then have some customer able to reserve a car that is stored in the list of cars. The part of inclusion, removal and visualization of customers I can...
asked by 29.10.2015 / 22:34
1
answer

Mathematical operations on ARM-M4 lock when PWM interrupt is on

When I turn off the timer overflow interruption of PWM (+ - 15Khz) operations occur normally. But when it's turned on the processor gets lost in floating-point operations. I follow the debug in step mode but at some point the debug does n...
asked by 08.04.2014 / 20:48
1
answer

How do I save an undefined string in a structure?

#include <stdio.h> #include <stdlib.h> #include <string.h> struct Ecoponto{ int codigo; int contentores[3]; char cidade[20]; char *rua; int nporta; }; int main(int argc, char** argv) { struct Ecoponto ecop...
asked by 05.01.2017 / 21:14
3
answers

Why does the while not stop?

#include <stdlib.h> #include <stdio.h> int main() { int i,j; char elenco[30]; while(elenco[i]!='s' || i<=20) { printf("indique um menbro do elenco ,se quiser sair escreva apenas a letra S");gets(elenco...
asked by 14.12.2017 / 11:03