I'm having a hard time getting a dynamically linked list inside another using data structure and manipulating it, as I have not found anything that exemplifies how to create a list within another. I can create a single dynamic list, but I can no...
I am using the system("comando"); function to execute bash commands in a program in C.
However, I'm having trouble printing the value of a variable.
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char* letr...
I am receiving a quantity of data coming from a server, the client (the code below), after sending a message, it receives another one, but would like to know the size of the message that is coming from the server to allocate the variable before...
I have the following method that gets two int variables as a parameter and I need to concatenate these two values into a char * variable, but for this to be possible it is necessary for these two int variables to be converted to char *.
void...
How can I isolate the processor to run only my program in C?
It is more a didactic and academic question passed by my teacher of AI.
He asked us to run millions of real-number sum operations, and take the time the processor took to run the...
The error in question in a flag that should supposedly be correct, follow the code below:
#include <stdio.h>
#include <string.h>
int main() {
char var[50]=" Write Once Bug Everywere ";
int i,cont=0;
for (i = 0; i < 50; i++...
When compiling my own programs, I have the freedom to change some flags of the compiler and start using the -O3 optimization.
This optimization can break some programs. I understand that the compiler should do and assume several...
#include <stdlib.h>
#include <time.h>
int maior(int n, int A[]){
if(n==1)
return A[0];
if(maior(n-1, A)<A[n-1])
return A[n-1];
else
return maior(n-1,A);
}
int main(){
int n, i;
printf("Ta...
Converting a string to an integer with the atoi() function is easy, is not it?
However, when I use the atoi() function to convert a character to an integer, the program that is at runtime simply crashes.
What would be...
We usually use files to save data using C language (I at least). Is it possible to connect a relational database to some application made in C ? If so, do you need any library for this and how is that connection made? Preferably MySQL.