Questions tagged as 'c'

1
answer

File reading in C

I'm doing a project in C, which requires creating and reading a file. I'm having trouble implementing the reading. In reading I have already tried to apply fgets() , fscanf() and fread() . But none worked. Does anyone suggest...
asked by 09.11.2015 / 06:44
1
answer

Precedence of operators with pointers

Having, for example, the following instructions: int i=10, j=20; int *pti, *ptj; pti = &i; ptj = &j; What is the meaning of j = pti == ptj; and i = pti || ptj; ? In addition, I've read that summing the subtraction b...
asked by 03.08.2015 / 14:46
2
answers

Why is it giving error when trying to compile the program with this library (IUP)?

Adding a C library is giving this error when trying to compile ||=== Build: Release in iup (compiler: GNU GCC Compiler) ===| obj\Release\main.o:main.cpp|| multiple definition of 'WindowProcedure(HWND__*, unsigned int, unsigned int, long)@16'|...
asked by 06.09.2015 / 02:23
1
answer

How to correctly divide a number up to only one digit in C?

I have the following function: divisibilidade11(int num); And the following variables: int dividendo; int divisor; When the user enters the variable 11 for the variable divisor the function divisibilidade11 will be...
asked by 14.05.2017 / 02:37
1
answer

Program does not execute anything when it comes into function

My program runs, but soon after asking for the value prob() and .exe to work. I thought it was some communication problem between functions because of the lattice[][4] array as an argument, but I've already tried, fixed,...
asked by 25.07.2015 / 00:26
1
answer

Java using .DLL library

I'm having trouble creating the interface in java, because I can not figure out the header of the function in C. Example Header C function: CMOEP_API char * CALLCONV CMP_GetLastError( ); Now in java I have this but I do not know how to i...
asked by 22.09.2014 / 17:07
1
answer

Doubts in Binary Tree in C - Print order, preorder and post order

I have several doubts about how binary tree work in C. I have an insertion, removal and printing code in order, pre-order and post-order. These codes were taken from the internet, because I could not understand what each line does following t...
asked by 26.03.2017 / 22:09
2
answers

Char pointer or char array?

There is a program I took in a company where pointers of char , type char* , and then allocated a memory for it with malloc , done the operations and in the end deallocated this memory. Usually receives all characters, up to ma...
asked by 03.03.2016 / 14:21
1
answer

End loop when typing specific character

Hello! I need to resolve the following question, but I can not. Write an algorithm that computes the mean arithmetic of the students' 3 grades (number indeterminate number of students) of a class. O algorithm should read, in addition to the n...
asked by 19.09.2015 / 23:53
2
answers

Configure the compiler output path in NetBeans

Would anyone know how to configure Netbeans, so that when I compile a project, I run the executable in a particular folder? In the project properties, you have the linker option, which I believe is the output of the program, there is this direct...
asked by 08.07.2015 / 15:46