is there no one who can answer this query????

Status
Not open for further replies.

Kazzam

Full Member level 1
Joined
Jul 23, 2007
Messages
95
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,850
what is the difference between gcc and cc?
also what do you mean by sequence point in C language


thanks to all in advance
 

Kazzam said:
what is the difference between gcc and cc?
also what do you mean by sequence point in C language


thanks to all in advance

GCC is just a short form of GNU compiler collection.
CC-Compiler collection


Sequence point:

From Wikipedia, the free encyclopedia

A sequence point in imperative programming defines any point in a computer program's execution at which it is guaranteed that all side effects of previous evaluations will have been performed, and no side effects from subsequent evaluations have yet been performed. They are often mentioned in reference to C and C++, because the result of some expressions can depend on the order of evaluation of their subexpressions. Adding one or more sequence points is one method of ensuring a consistent result, because this restricts the possible orders of evaluation.

Consider two functions f() and g(). In C and C++, the + operator is not a sequence point, and therefore in the expression f()+g() it is possible that either f() or g() will be executed first. The comma operator is a sequence point, and therefore in the code f(),g() the order of evaluation is defined (i.e., first f() is called, and then g() is called). The type and value of the whole expression are those of g(); the value of f() is discarded.

Sequence points also come into play when the same variable is modified more than once. An often-cited example is the expression i=i++, which both assigns i to itself and increments i; what is the final value of i? Language definitions might specify one of the possible behaviors or simply say the behavior is undefined. In C and C++, evaluating such an expression yields undefined behavior


https://en.wikipedia.org/wiki/Sequence_point

Ciao,
Shiva
 

    Kazzam

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…