Questions tagged as 'c'

1
answer

What is the difference between pointer to vector and pointer to variable?

int A; int* pA = 1; int Vect[2] = {1,2}; int* pVect; pA = &A; *pA = 2; pVect = Vect; pVect[0] = 10; In the case I have a pointer to a variable and then to a vector, and I want to change its values by the pointer. Why is there such a dive...
asked by 29.03.2017 / 06:31
1
answer

Reading a bitmap image

Hello, I have a college work on steganography and one of the requirements is to read an image in bitmap (bmp) format, but I have already looked for a lot on the internet and the information that exists is the same on this subject, I do not know...
asked by 07.06.2017 / 10:27
1
answer

Binary Tree Implementation - C Language

I'm trying to do a tree nodes insert. I'm using this code, but there are a number of small errors that I can not understand why the errors. The last one is related to value1 , which is not declared. However I need my new node to get a v...
asked by 23.07.2017 / 05:22
1
answer

Referencing struct within another in C

I need to have a reference of struct within the other. But in the example below as struct TAnimal does not yet exist, its reference to struct player of error. How to get around this situation? typedef struct jogador{...
asked by 18.03.2017 / 13:18
3
answers

Problems with if doing 2 functions

I have to make a code where I calculate the imc, but if the person is 15 years old or less not to be calculated but still calculating #include <stdio.h> void main() { float peso, altura, imc, idade; printf ("digite seu...
asked by 26.03.2018 / 20:11
1
answer

Encapsulating instance structure

Given the following code, implement a small library that makes it possible. #include <stdio.h> #include "object.h" int main() {     obj_instance *oi1;     obj_instance *oi2;          object_init();          oi1 = Object.New();     oi2 =...
asked by 09.01.2017 / 16:51
1
answer

How to output the index of my array in C?

I have a program that will check 9 numbers and say which one is the largest of all, and for this I am using vetor already filled with values, and am using a for to go through all vetor e look for the greater. The problem is...
asked by 24.06.2017 / 15:45
1
answer

C - Is it possible to insert an array into a structure? [closed]

A question that came to me days ago was whether it is possible to insert a matrix into a structure, I think so, but in the process of deciding to clarify it. EXAMPLE typedef struct matrizexemplo { int matriz[2][2]; }     
asked by 07.12.2016 / 00:51
1
answer

How to make a query in C language?

Good evening, I'm making a project of writing files in binaries in a txt and then reading those files. But I have to read the file or list all. How could I do a search for the required file? And one more question what is feof? List the last give...
asked by 03.12.2016 / 03:40
1
answer

Scanning an entry by scanf does not move in the string beyond the blank space

I'm trying to make a program that reads a sentence, and then put each word initial in capital letters, if not already. The problem is that I type a sentence but it only returns the first word, nothing more. the word is with the first capital let...
asked by 06.03.2017 / 01:42