Questions tagged as 'c'

2
answers

Segmentation Fault When Removing List Occurrences

The following code has the purpose of removing all occurrences of an integer in a list (linked lists), returning at the end the number of elements removed. Home Give me the segmentation fault error. Thanks for any explanation. typedef struct l...
asked by 26.04.2018 / 20:35
1
answer

Doubts regarding the use of the memset and memcpy functions

I've been crawling some codes on the internet and at a certain point I ended up with the functions memset and memcpy . I was able to understand superficially the functions of the mentioned functions, since all sources that provide s...
asked by 04.05.2018 / 05:50
1
answer

error: assignment to expression with array type

I'm trying to compile the code below for a list of exercises from my course course of introduction to programming but the codeblocks throws the error mentioned in the title when I try to compile the code. #include<stdio.h> int main(){...
asked by 08.05.2018 / 15:01
1
answer

How to send a dynamically created array as a parameter to a function?

In the exec I am developing, I try to pass a dynamically created array created with the malloc function, but doing so compiles the pointer type as incompatible. #include <stdio.h> #include <stdlib.h> #include <math.h>...
asked by 28.02.2018 / 21:25
1
answer

Plain text editor in C

I have the following proposed exercise:    Make a program that mimics a text editor. Initially you will read the data entered by the user (lines of text) and create a vector in memory where the texts provided by the user will be stored (text...
asked by 12.06.2018 / 04:41
2
answers

Recursive program question for writing vowels in C

   Make a recursive function written in the programming language C with two parameters: a string and the initial position that should be considered in the search. The function must write the vowels found in the string from the initial position i...
asked by 04.07.2018 / 01:58
1
answer

Header files in C ++ using more than once

I'm developing a multiplatform project (Windows - Linux - MacOS). During its development and when generating documentation (via Doxygen) I realized that there are many *.h files to be called by several *.cpp files. My questions are...
asked by 04.07.2018 / 17:57
3
answers

Binary Tree Removal

Personal how does the tree look after the 40's removal? In my understanding, instead of 40 would be number 41, right 44 and left 30. And the right of 44 the number 49, so right?     
asked by 14.12.2017 / 11:13
1
answer

Convert C code to MIPS assembly?

How can I generate the Assembly code corresponding to the code below: #include <stdio.h> #define LINHA 4 #define COLUNA 5 int tab [LINHA][COLUNA] = { 2016,2012,2008,2004,2000, 1916,1911,1908,1904,1900, 1861,1857,1852,1846,...
asked by 03.10.2017 / 21:54
1
answer

Splitting string in C

I'm very new to C, but I have a lot of experience with python, I have a project that I need to get 3 numbers on the same line and make a vector with these 3 numbers in the input digit 3 1 37 I wanted you to form a vector [3,1,37] there...
asked by 04.10.2017 / 17:10