I wrote an algorithm in C that uses the strcmp() function. Even forgetting to add the string.h algorithm worked.
I would like to understand how it worked since I only found this function in the string.h library.
#includ...
In GCC I typed in the terminal:
gcc -wall -o nomedoarquivo.c nomedoexecutavel
or if you only had 1 .c file [NOTE: typed "a" to facilitate the executable name]:
gcc -wall -o *.c a
The restriction I used, if there was in the code the...
Personally I need to create a buffer (string) of a dataset (array) to send via socket. In this buffer I want all the attributes of the set that are stored in it, obey its size.
Example: If I am going to store an integer value of the data...
I have the following problem, I need to compare two strings ignoring the accent, for example:
Étnico | Brasil
Using a normal function of comparison is returned that "Ethnic" comes first that "Brazil" in view...
I would like to know how I can print the information collected in Creator_Matrix using the Print function. This is the code I have made so far:
#include <stdio.h>
#include <stdlib.h>
float **cria_matriz (int lin, int col){
int...
I'm creating a sequence of processes through the command fork , but when I was listing the processes generated by the code, I came across that there was a larger amount than I had created. Why this?
By 10 forks 1024 proces...
I need to declare a vector of pointers, which will point to types float , and do a simple reading of values.
The program compiles but after entering 4 values I get a Segmentation fault (core dumped) .
Why does this occur because I'v...
I have the following line of code:
int a = MAX(b,c);
How to check the definition of the MAX(b,c) macro? Sometimes the same macro is defined in several different ways in a code (for example, depending on the architecture). This would...
I have this function that converts decimal to binary, but then how do I sum the bits, or use & (and) .. etc?
Use the & do we have to make the count with 2 decimals?
Ex:
25 & 25
Or we can do
11001 & 11001
My question...