Questions tagged as 'c'

0
answers

Installation of GraphApp, for C?

I am not able to install a package for developing graphical interfaces in C, called GraphApp, this is the official website with documentation and everything: link This is the specific part of the installation: link And this is a tutori...
asked by 16.08.2018 / 16:25
2
answers

How to count how many substrings are in a string in C? [duplicate]

link This exercise I thought it best to read as string or not ... #include <stdio.h> int main(void) { char N1,quantidadesdeN1; while(scanf("%s",&N1)!=EOF) { scanf("%s",&quantidadesdeN1); /*Como faço pra ver...
asked by 13.08.2018 / 19:08
1
answer

How to print a vector of integers in the form of a heap?

Well, I'd like to know how to implement a function in language C, that given any integer vector (int v [] = {3,4,2,1,6,7}), it can print the vector as a heap. Ex:     
asked by 05.08.2018 / 01:47
2
answers

What is the C / C ++ volatile operator?

I've seen some code in C / C ++ statements like this: volatile int i = 0; I would like to know what the volatile operator is and in what cases I should use it.     
asked by 22.03.2014 / 15:16
0
answers

Function to multiply each row of a matrix by the value of its corresponding secondary diagonal

I can not get the values of the secondary diagonal of an array by a function. /* 19) Elabore uma sub-rotina que receba como parâmetro uma matriz A(6,6) e multiplique cada linha pelo elemento da diagonal principal da linha. A sub-rotina deverá...
asked by 24.07.2018 / 21:08
1
answer

Segmentation fault when reading file

I have an inputstream.h header that defines a struct having a string, an int, and a readc function. In this header, I define the function init, receiving as a parameter a string having the absolute directory of a file, and the struct inputstream...
asked by 26.07.2018 / 15:00
2
answers

Generate random number without repetition in C

Hello, I am making a memory game in c, and would like to know how to generate a random number without repetition. I will post what in the function so far. Do I need to do another function only to check if there is a repeated number? void preen...
asked by 21.06.2015 / 22:14
1
answer

How to store a word within a vector with a size larger than the word

I declare a char SendDataCmd[256] variable that will store commands sent from the computer to the microcontroller via UART . The commands have different sizes such as RST, ADV ON e SET SNAME=BC118 among others. I have a funct...
asked by 19.07.2018 / 14:31
0
answers

How to fill a matrix randomly

I have an array filled with the value one in the center, and I want to add new positions with the value 1. These values must be in the boundary dimensions of the array. However, these positions should be changed later until the position reached...
asked by 15.07.2018 / 21:06
1
answer

C socket problems

I have 3 functions responsible for creating a socket, sending data and receiving data. The function sock_create creates a new socket returning an int from this socket, the function sock_send sends a header to the sockfd (server), and finally the...
asked by 14.07.2018 / 16:45