Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Sequence Point Violation?

Posted on 2007-03-29
2
160 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-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.

856 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