Hi,
I am a basic learner in C language.Could u please provide me a good link or tutorial or explanation regarding "order of precedence".
I have the table of "order of precedence"........but needed some examples.
I am always confusing with them. like,
*ptr++=something;
*++ptr=something
i=i++................etc.
Thanks & Regards.
pointers 2 Light Poster
Recommended Answers
Jump to PostMinor nit, ~s.o.s~, the initial examples by the OP were expressions and not declarations.
I am a basic learner in C language.Could u please provide me a good link or tutorial or explanation regarding "order of precedence".
I have the table of "order of precedence"........but needed some examples.
I am …
Jump to PostAfter a bit of a distraction, an example "practice" might begin with a skeleton like this.
#include <stdio.h> int main(void) { int array[] = {1,2,3,4,5,6,7,8,9}; int *ptr; size_t i; puts("Show initial array."); for ( i = 0; i < sizeof array / sizeof *array; ++i ) { …
Jump to Post@ Dave Sinkula,
string_ptr = string; /* point to the uninitialized garbage */
string_ptr = "This is a string of less than 60 chars"; /* re-point to a string literal */This is the trouble part of my code then. I thought once I pointed the
first time to the …
Jump to PostI'm not Dave, but I'll try to help ;)
Thank you Joeprogrammer, I think I get it now. This would never work:
*string_ptr = "This is a string";
because I will be trying to fit a whole array of chars inside just one
char which is the …
Jump to PostI guess what I would like to know..., is there a way I could change the value in the string array using the pointer?. Or I will always need to initialize the array with the string?.
Actually there are many ways to change value of a character array using a …
All 21 Replies
Lerner 582 Nearly a Posting Maven
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Dave Sinkula 2,398 long time no c Team Colleague
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Dave Sinkula 2,398 long time no c Team Colleague
Nick Evan commented: very clear example, nice one! -Niek +1
Aia 1,977 Nearly a Posting Maven
Dave Sinkula 2,398 long time no c Team Colleague
pointers 2 Light Poster
pointers 2 Light Poster
jbennet 1,618 Most Valuable Poster Team Colleague Featured Poster
pointers 2 Light Poster
Aia 1,977 Nearly a Posting Maven
John A 1,896 Vampirical Lurker Team Colleague
Aia 1,977 Nearly a Posting Maven
John A 1,896 Vampirical Lurker Team Colleague
Dave Sinkula 2,398 long time no c Team Colleague
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
Dave Sinkula commented: Thanks for doing my cleanup/followup. I was meaning to get around to it... --Dave +9
pointers 2 Light Poster
John A 1,896 Vampirical Lurker Team Colleague
Dave Sinkula 2,398 long time no c Team Colleague
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.