Hello. I need to create a process tree, so far what I managed to do was create one side of the tree, kill everything and then create the other side.
But I need to create the whole tree before and start killing the children and the father.
My...
I'm using the LEX generator to do a lexical analysis of a simple code in C ++. The following code is from the generator:
%{
#include<stdio.h>
%}
extern FILE *yyin;
%%
"<" {printf("(Identifier, %s)\n",&yytext[0]);}
"&...
I'm doing a job for college and I need to check word for word from a "dictionary" in file txt and compare those words with the words of an array that was provided.
In order to make my life easier (as I'll have to figure out some way to...
I'm trying to split an entry of the following type:
1444771699,Andre Alves,SAQUE,-500.00,,200
I'm trying to use strtok , but it ignores empty space. Any idea how to split the string without ignoring the space?
I'm studying dynamic stack from the code below:
#include <stdio.h>
#include <stdlib.h>
#define tam 50
// ---- Estruturas para os tipos -------------------------------------------------------------------------------
typedef struct...
I have the following function: A .
Is it possible to use the B for loop to generate declarations as in the A function?
What to use instead of printf to become a declaration?
printf("%s%i%s\n",ad1,i,ad2);
A
void functionX(unsigned...
There is a more efficient way to do this same function and I do not know why my computer is not working.
#include <stdlib.h>
#include <stdio.h>
void ordena(int A[],int n);
int buscaBinaria( int chave, int inicial, int v[]);
int...
If I use char *char_commandout = (char *) malloc(1); , the allocated byte will store "\ 0" at position 0 of the vector or it will allocate a space for the value that I want to store (at position 0) and one for "\ 0" (in position 1)?
Studying strings in C I came across the following phrase: "Cleaning the buffer, for example, is not always desirable, and for more professional and safe programming it is not recommended to use fflush for example."
Why using the fflush()...