Questions tagged as 'c'

2
answers

Explanation of recursion operation

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...
asked by 04.12.2018 / 14:28
1
answer

Compare two strings in C

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...
asked by 07.11.2014 / 14:32
3
answers

How to see the implementation of a function?

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:...
asked by 25.09.2014 / 23:49
2
answers

How to make a struct in C #?

How to make a structure in C # where you create a type? For example, in C ++ we use: struct teste { int a; char c[30]; };     
asked by 03.01.2016 / 02:41
2
answers

Problem with math.h functions

I always get as a result: 0.000000 #include<stdio.h> #include<math.h> int main() { float x1, y1, x2, y2, resultado; printf("insira x1:"); scanf("%f", &x1); printf("insira y1:"); scanf("%f", &y1); print...
asked by 14.03.2014 / 01:43
6
answers

Merge two strings into a vector

/** 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...
asked by 22.06.2017 / 20:00
2
answers

If you are not checking the condition correctly

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...
asked by 09.07.2017 / 05:14
3
answers

from while to number other than 0 in C

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...
asked by 19.09.2015 / 17:40
2
answers

Problem in table in C

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...
asked by 23.03.2018 / 20:22
1
answer

Measure memory usage in c

Hi, how can I measure the ram memory usage of a program made in c? Do you have any specific tools or anything?     
asked by 06.05.2018 / 16:37