Questions tagged as 'ponteiro'

1
answer

What is the purpose of the while (* variable) and if (! * variable) in the "while" and "if" statements?

In the Code Review there is a implementation of a simply linked list
asked by 08.11.2016 / 00:02
3
answers

What are the differences between pointer and reference in c ++?

This question is a specific c ++ version of the question: # In practice, what are the differences between a pointer and a reference in C ++? I say in practice because I would not like merely descriptive and sometimes ambiguous answers, suc...
asked by 12.01.2016 / 21:04
2
answers

Why do not you need the '&' in 'scanf ();'?

I learned that the variable always has to have & , but in this example it does not need to and still shows the result. Why did not you need & no scanf(); ? #include <stdio.h> int main(void) { int int1, int...
asked by 12.08.2018 / 23:52
2
answers

Access to specific memory points

How do I access an exact memory address in Windows? unsigned char * mem = {??};     
asked by 22.07.2015 / 01:16
2
answers

Array is a pointer in C? [duplicate]

I'm reading a book about pointers in C, but since I'm new to such a language, the concept of pointers is a bit complex, and when I read the following definition, I came up with the question of whether an array is a pointer .    Pointer Var...
asked by 03.07.2017 / 15:18
1
answer

What is the use of * in the expression "Foo * foo = new Foo" in C ++? [duplicate]

I was analyzing this question made in SOEN. There you are teaching to instantiate a particular class. I was able to understand more or less how it works, because when I use my example, it is giving error when compiling. class Pessoa {...
asked by 05.01.2016 / 15:50
2
answers

What does this piece of cast code do?

code taken from Linux x86_64 execve Shellcode #include<stdio.h> #include<string.h> unsigned char code[] = \ "\x48\x89\xc6" // mov %rax,%rsi "\x48\x89\xf2" // mov %rsi,%rdx "\x49\...
asked by 21.06.2016 / 22:08
3
answers

Can a global pointer point to a local variable?

In the case below, for example: int *pnum; void main(){ int num = 10; pnum = &num; } What would happen if I tried to access the pointed value of the pointer outside the main function?     
asked by 21.11.2015 / 01:52
1
answer

Is it correct to return a memory address in function?

I was asked to design a function that was called, open a .txt file and return the pointer of this file, that is, return a memory address. However, as far as I know the memory is only temporarily allocated to functions, ie after the execution of...
asked by 29.08.2015 / 19:30
1
answer

Why can I access a structure other than the pointer?

When I declare a pointer to struct I can access members without putting the address of a struct , why is it possible? For example: struct exemplo{ int a ; }; int main() { struct exemplo *p; p->a = 10 ; }    ...
asked by 22.12.2015 / 22:24