Questions tagged as 'ponteiro'

2
answers

Can a C compiler generate a 64-bit executable where pointers are 32-bits?

Most programs fit well in address space of less than 4GB, but in some cases the program may need to use the new processor features / instructions that are only available in the x64 architecture. Unfortunately the normal procedure would be to gene...
asked by 15.01.2014 / 02:37
3
answers

What is the purpose of void in C?

I have questions about using void in functions. 1 ° Example: int somaV(int valor_1, int valor_2) { return valor_1 + valor_2; } I know that this function will return an integer which is the sum of the two parameters in the func...
asked by 09.11.2015 / 15:54
3
answers

Why in the C language array [6] equals 6 [array]?

Note: Question I saw in the SO in English , but I found it interesting to post here (because we do not have many C questions yet): Because in C language, does this code print "true"? #include <stdio.h> int main(void) { int reais...
asked by 29.01.2014 / 16:11
2
answers

What is the meaning of the "&" (and commercial) operator in the C language?

I'm putting together a C booklet and I'm looking for a clear way to explain this operator to the reader, and I believe that this doubt will greatly help the people who are just getting started. See an example: Code #include <stdio.h&g...
asked by 28.04.2016 / 18:53
4
answers

Simple Pointer Teaching

I'm a sporadic programmer, and whenever I need to use pointers, I realize that I've forgotten how to use it, and I have to grate to learn everything again. Does anyone have any simple didactics to remember the concept of pointers, and that is...
asked by 25.07.2014 / 20:12
4
answers

Output a C code with pointers

I need to understand what each of the values printed on the screen means by the following code: #include<stdio.h> int main() { int i=5; int *p; p = &i; printf("%u %d %d %d %d \n", p, *p+2,**&p,3**p,**&p+4); return 0; }...
asked by 20.10.2017 / 12:27
2
answers

What is the difference between * var ++ and * var + = 1?

I am writing a function with the signature: int increment(int *val) . My intention is to get an integer pointer, increment its value in 1 and return that value. The body of my function was as follows: int increment(int *val) { *...
asked by 22.11.2015 / 18:35
1
answer

How to pass a function as parameter in C?

I wanted to know how the function passed by parameter works just like in pthread_create (thread,atributo,rotina,argumento); . In the rotina field a function is placed in void* .     
asked by 30.01.2014 / 02:01
2
answers

What is pointer to pointer?

How should you use pointer to pointer ? I have a hard time distinguishing what is memory address and value in memory when I try to use pointer to pointer, this seems mysterious to me. Could someone give me an explanation and an example of u...
asked by 16.10.2015 / 18:32
3
answers

Is it possible to use pointers in Java?

In language C we can use ponteiros as follows: int *ponteiro, teste; ponteiro = &teste; And in Java is there any alternative?     
asked by 13.04.2015 / 22:42