I was just browsing through a few C exercises, came across this:
The following code:
void main()
{
int const * p=5;
printf("%d",++(*p));
}
Type: Posts; User: WarDoGG
I was just browsing through a few C exercises, came across this:
The following code:
void main()
{
int const * p=5;
printf("%d",++(*p));
}
Thanks a lot for the help.
Thats not homework.. I asked these questions because i have no clue as to what the answer is. If i knew so, i wouldnt be asking.
But then, to elaborate on them more..
1. Can a pointer be...
I was going through a few C quizzes and was quite baffled by the amount of questions i could answer correctly. Never thought C was such a confusing language !
Well, anyway... here are some doubts...
I have absolutely no clue as to how it works, but i cant seem to find any resources to learn basics about O(log n) O(n) etc.. etc...
Anybody care to help ?
Well. thanks a ton !
All those explanations really helped. Thanks again.
Is this allowed ? I thought it isnt.
What is the difference between *start and *p ???
Im asking this because :
we create *p by :
struct node *p = malloc(sizeof(node));
Well, that creates another problem for me.
So, p points to currently allocated node struct memory.
Suppose that memory is 1776.
If the start pointer of linked list is *start pointing to first...
I was starting out with data structures, but had these few doubts:
struct node {
int x;
node *next;
};
Now, If we have a pointer *p such that
lol, that cracked me up.
Well, your explanation helped ! Thanks a ton !
Is there anything wrong with this :
I was trying to pass addresses of 2 variables to a function, but compiler is giving me an error.
add(&array1,&num2);
Anything wrong with the above code ?
Error is :
forgive me for such a n00b question but I have seen this symbol quite alot of times studying data structures n stuff... just didnt find the proper reference anywhere.
what does " -> " mean ?? can...