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...
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...
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...
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...
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...
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;
}...
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)
{
*...
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* .
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...