I'm at the beginning of system analysis studies and I'm learning programming language. In C language studies I started to see recursion and some codes that have recursion I get lost and I do not understand. I am doubtful in this simple code:
i...
Hello everyone, I want to compare two strings but the result is not returning what is expected, which in this case would be the index in the search_name function, the error is in the fourth line of the search function, but I am making all the cod...
From time to time I have some doubts about the efficiency of a code and I think if I see the implementation of a function that I'm using I can know how efficient it is or not.
Some examples of implementations that would remedy some doubts:...
/**
5. Faça um programa que receba 2 strings (A e B) e
retorne uma terceira string (C) formada pelos caracteres de A e B intercalados.
Ex.: Se A='Quarta' e B='Segunda', a resposta deve ser 'QSueagrutnada'
**/
#include <stdio.h&g...
It was me, trying to do a pretty basic program to know if a variable had a second decimal place or not. But I came across a bug, which in my view is bizarre.
Code:
#include <stdio.h>
#include <math.h>
int main(void) {
float...
I need the program to stop when the consumer number is 0. So I put one of the while saying that while the consumer number is different from 0 it continues the program and when the consumer number is 0, it finish the program. It turns out...
Can anyone tell me why the looping is not working correctly?
It was to print the table from 0 to 10, but instead it is printing numbered * 11.
Follow the code below:
#include <stdio.h>
int main(void)
{
int numero, cont=0;
pri...