Questions tagged as 'c'

1
answer

Scanf function causing infinite loop

I have a simple code that converts a char into an loop while , but when I run and put the first char , the program goes into loop infinity, here goes the code: #include <stdio.h> int main() { char c; while (1) { p...
asked by 30.04.2018 / 18:11
0
answers

Questions about C functions [duplicate]

I created a variable inside a function and I want to use the value of this variable in another function, is it possible to do this without creating a global variable? In case the first function asks the user to enter a name and the second o...
asked by 30.04.2018 / 04:15
1
answer

Receive a long String with a esp 01

I have a esp 01 (wifi module) connected in my Arduino on port 2 and 3 (TX RX), I can send a large String, but when I receive it I can only receive a maximum of 32 characters, here it is the code of my Arduino: #include <SoftwareSerial.h>...
asked by 29.04.2018 / 22:37
1
answer

I can not make the "putchxy" function of conio2.h work

Hi. I started the computer science course this year and until then I had never been able to study programming at all, so maybe that's why I'm having such basic errors like this. My problem now is with the C library, which I have to use to do...
asked by 29.04.2018 / 23:45
0
answers

Error while showing a String

I'm asking the question Input and Output with Virgula , I'm doing everything the question asked but I'm taking 30% error, could they help me wherever the error is My code #include <stdio.h> #include <string.h> int main(int argc...
asked by 30.04.2018 / 22:58
0
answers

How to change the process name of a program in C \ C ++ (Windows Lib)

I am creating a utility program for windows but I can not change the name that appears in the task manager, I have already tried SetConsoleTitle("atwconnect"); but changed only the window name but not the process name of the task manager....
asked by 03.05.2018 / 08:51
0
answers

Basic pointer question

I needed to make a program that the user enters two sentences, then the program identifies the first occurrence of sentence 2 in sentence 1, and then deletes that occurrence and prints the new first sentence. For example, the user types "the mou...
asked by 22.04.2018 / 20:23
2
answers

Returning direct and array function string

What works: void *teste(); int main () { printf("\nRESULTADO: %s\n", teste()); return 0; } void *teste(){ return "Ponteiro"; } What goes wrong: void *teste(); int main () { printf("\nRESULTADO: %s\n", teste()); retu...
asked by 03.11.2017 / 15:11
0
answers

How to generate two child processes in which each one writes a string in the PIPE and the parent process le PIPE and joins the two strings?

include include include include include include int main (void) {         int status = 0;         int fd [2], nbytes;         pid_t pid, wpid;         char string1 []="Hello, \ n";         char string2 []="World! \ n";         ...
asked by 22.04.2018 / 04:58
0
answers

Problems with Makefile generation

I'm having a problem generating the Makefile file in my project. The project folder structure is: Home - > Project    Subfolders - > include (my files with extension .h), src (my files with extension .cpp) and test (test files of...
asked by 21.04.2018 / 21:14