GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 362 of 453    Print  
What is a sequence point? what is its significance?

  
Total Answers and Comments: 1 Last Update: September 05, 2007     Asked by: pbchaudhari 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 05, 2007 00:58:44   #1  
ganesh.g        

RE: What is a sequence point? what is its significance...
A sequence point is loosely referred as the point at which an expression is evaluated and all the objects involved in that expression are assigned their fresh values if any.

Example: 1. Between the statements i. printf(" d" *intp++) and
ii. printf(" d" *intp)
Here int pointer variable is updated before the next statement i.e. ii.

2. At the operators && || and ?: you can imagine there is a sequence point.

One important concept in C programming Language is:

When an object is modified and inspected for within a single sequence point the operation is UNDEFINED.

Example: These are undefined:
1. a[i] i++;
2. printf(" d t t d nn" *intp++ *intp);
3. int i 7;
printf(" d n" i++ * i++ );


End Note : For this question better reference is "C Programming FAQ" By Steve Summit especially chapter titled: Expressions.

Any mistakes are my own.

Thanks
Ganesh.G

Bangalore India.




 
Is this answer useful? Yes | No

 Related Questions

The register modifier hints to the compiler that the variable will be heavily used and should be kept in the CPU’s registers, if possible, so that it can be accessed faster. There are several restrictions 
Latest Answer : If a variable is defined by using register modifier it tells to the compiler that the variable is used repetedly and that variable executes fastly. Generally register variables are defined in loop counters. This variable stored in CPU registers and access ...

Floating-point numbers are the “black art” of computer programming. One reason why this is so is that there is no optimal way to represent an arbitrary number. The Institute of Electrical 
Latest Answer : A program running in the database that can take complex actions based on the inputs you send it. Using a stored procedure is faster than doing the same work on a client, because the program runs right inside the database server. ...

The answer depends on what you mean by quickest. For most sorting problems, it just doesn’t matter how quick the sort is because it is done infrequently or other operations take significantly more 
Latest Answer : The algorithms which follows divide and qunquer technique provides fastest implementation. ...

The answer depends on the situation you are writing code for. Macros have the distinct advantage of being more efficient (and faster) than functions, because their corresponding code is inserted directly 

The standard C library provides several functions for converting numbers of all formats (integers, longs, floats, and so on) to strings and vice versa  The following functions can be used to convert 
Latest Answer : sprintf() is used to convert integer to string. ...

The standard C library provides several functions for converting strings to numbers of all formats (integers, longs, floats, and so on) and vice versa.  The following functions can be used to convert 
Latest Answer : /*Let take an example*/main(){char rasmi="111";int ranjan;ranjan=atoi(rasmi);printf("n This is Rasmi Ranjan Nayak's Reply %d n", ranjan);} ...

There are times when it’s necessary to have a pointer that doesn’t point to anything. The macro NULL, defined in , has a value that’s guaranteed to be different from any valid 
Latest Answer : hi,   Null pointer:   When referring to computer memory, a null pointer is a command used to direct a software program or operating system to an empty location in the computer memory. Commonly, the null pointer is used to denote the ...
Tags : Pointer

A void pointer is a C convention for “a raw address.” The compiler has no idea what type of object a void Pointer “really points to.” If you write int *ip; ip points to an int. 
Latest Answer : Void Pointer or Generic Pointer is the one to which any datatype can be assigned.eg.main(){    int *p;     void *vp;     vp=p;} ...
Tags : Pointer

The hardest part about using a pointer-to-function is declaring it.  Consider an example. You want to create a pointer, pf, that points to the strcmp() function. The strcmp() function is declared 
Tags : Pointer

Pointers to functions are interesting when you pass them to other functions. A function that takes function pointers says, in effect, “Part of what I do can be customized. Give me a pointer to a 
Tags : Pointer


 Sponsored Links

 
Related Articles

Point to Point Protocol (PPP)

Point to Point Protocol PPP The Point to Point Protocol is a platform that is used to connect any individual computer or a network to the internet service provider The connection is established between two points only and that is why it is called Point to Point Protocol The PPP is considered be the
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

What is Access Point

An access point (AP; or also "WAP" for "wireless access point") is a node responsible for the formation of a wireless network through connection between wireless communication devices. It acts as a central transmitter and receiver of wireless radio signals, and is
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school’s al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 

Programming Languages Certification

IT Certification programs have several options that will offer you the best knowledge.  By learning everything that you need to know about information technology you will be able to open new doors to your career and personal business desires.  IT Certification offers several vari
 

Neuro-linguistic Programming Methods

Neuro linguistic Programming Methods There are several methods used for performing Neuro linguistic Programming on an individual for obtaining insights into the psyche of the person in order to correct to modify certain patterns of behavior These techniques are also used for Neuro linguistic trainin
 

UML Elements : Sequence Diagram

UML Elements Sequence Diagram In the Unified Modeling Language the sequence diagram is the name that has been given to the Message Sequence Chart The sequence diagram will be responsible for showing various processes or elements that exist together simultaneously and it will often be represented by
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape