Solved

Sequence Point Violation?

Posted on 2007-03-29
2
157 Views
Last Modified: 2010-04-01
Suppose you have a string of bytes, each representing an integer value, and you iterate through them with a pointer.

You have:

unsigned char byte_string[100] = { some values in here }
unsigned char* p = byte_string;

Is it legal to increment p by one of the values in the byte_string like this:

p += *p;

Does that violate the sequence point rule?
0
Comment
Question by:chsalvia
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 25 total points
ID: 18820897
As I read the rule, I don't think it does.
0
 
LVL 11

Assisted Solution

by:DeepuAbrahamK
DeepuAbrahamK earned 25 total points
ID: 18821696
Good Read
http://en.wikipedia.org/wiki/Sequence_point
Best Regards,
DeepuAbrahamK
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now