Questions tagged as 'c'

1
answer

Problem in using char string

Galera helps me: the exercise I'm trying to do is 4. Write a program where: a) Read a character that must be one of the alphabet vowels, which may be uppercase or lowercase. b) If a function is found in which you check which vowel has been...
asked by 20.06.2016 / 17:02
1
answer

Language C: Manipulating a vector of structs within functions

Hello, I created a struct : typedef struct { float valor; float peso; } objeto; And inside main () I created a vector of these guys: objeto conjunto[50]; Here, I need to exchange a 'place' object with...
asked by 09.06.2016 / 17:04
1
answer

SDL - C - How to check if the mouse pointer is over an image?

Hello, I'm starting a learning about the graphical interface SDL in C and I intend to make a menu. In this menu there will be the options and when the user hover over some, it will change color (yellow to green) only I'm having difficulty in this...
asked by 11.06.2016 / 19:44
2
answers

Delete a record in struct

I am creating a registry using struct , where I should have a menu to insert, display, delete and exit the program. My difficulty is to create the delete function, I put a null value on the position pointer that will be deleted, I inden...
asked by 05.08.2016 / 02:05
1
answer

Using pointer pointer in C

Hello I'm doing a C algorithm work and stopped at one part. The program has to read from an input file and insert it into an n-ary Trie tree. The code that le le of the file is this: int abre_arquivo(TRIE_N ** root) { FILE* arquivo;...
asked by 05.06.2016 / 21:24
2
answers

Index of the first negative number of a vector

I have to do a program in C that saves the index of the first negative number, but I can not do it. The question is this down: Construct a C program that enters 5 integers into an A vector, and print out the index of the first negative number...
asked by 18.06.2016 / 03:24
1
answer

How to fill a heart?

When making an outline of a heart: #include <stdio.h> #include <stdlib.h> #define TAM_MAX_PONTOS_EXTERNOS 300 #include <math.h> typedef struct{ float x; float y; } ponto; int main() { printf("Programa que plota o...
asked by 18.06.2016 / 03:28
1
answer

Stack of characters

Good night people, okay? I'm with my program here from RPN Calculator and apparently everything is working normal despite great difficulties to work with char stack. I'm missing implementing the power function on my calculator only, but nothing w...
asked by 20.10.2016 / 02:43
1
answer

Get ID of a process [closed]

I wanted to get a process ID because I would like to use kill() to send process signals to it. I know that to get the ID of the process itself it uses getpid() however I do not know how to get the ID of a process that we only know...
asked by 06.05.2016 / 18:10
1
answer

I have an error in scanf

I have to read N lines with one of the following 3 formats: P k ": the letter P followed by k where k is an integer; A : the letter A followed by k being an integer; " Q ": the letter Q . As I do not know if the person goes by...
asked by 09.04.2016 / 03:27