GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  OOPS
Go To First  |  Previous Question  |  Next Question 
 OOPS  |  Question 41 of 255    Print  
Why preincrement operator is faster than postincrement?

  
Total Answers and Comments: 2 Last Update: December 30, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
August 30, 2005 06:54:31   #1  
Ruth Samuel        

RE: Why preincrement operator is faster than postincrement?
Preincrement can be faster on systems where the increment can not begin until the comparison is complete -such as a Pentium. The P6 core can use register aliasing to start the increment (using 'load effective address' so as not to ruin the comparison test).
 
Is this answer useful? Yes | No
December 30, 2006 16:08:57   #2  
GAURAV MODY        

RE: Why preincrement operator is faster than postincr...

the pre inc operator increments the value of that particular variable on that line itself

the post inc operator increments the value of that particular variable  after going on the next line

in simple words

eg.

e=5;    on this line value of e=5

e++;     on this line value of e=5

++e;     on this line value of e=7.

gaurav mody.


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : In C++, assignment and copy construction are different because the copy constructor initializes uninitialized memory, whereas assignment starts with an existing initialized object. If your class contains instances of other classes as data members, the ...

Latest Answer : the pre inc operator increments the value of that particular variable on that line itself the post inc operator increments the value of that particular variable  after going on the next line in simple words eg.e=5;    on this line ...

Latest Answer : Do any operation symbolizing the operator in your class.you can add/subtract/multiply/divide or do any other operation for +operator() the choice is entirely yours.Freedom you see ...

Latest Answer : Bitwise OR - | is the correct answer- x = x | SET_ON ...

Latest Answer : Bitwise and - & is the correct answer. n=n & 0177 ...

Latest Answer : The bitwise XOR ^ sets a one in each bit position where its operands have different bits and zero where they are same. ...

Latest Answer : One's complement ~ ...

Latest Answer : A scope resolution operator resolves scope ambiguity in cases where a base class and a derived class both define data member or function with the same name.Most generally a scope resolution operator is required when a data member is redefined by a derived ...

Latest Answer : Function overloading refers to having two or more methods in the same scope which have the same name but different signature. (Note that a function signature includes name of the function, ordered list of parameter data types. It DOES NOT include the ...

Latest Answer : I Think Computer languages have certain set of operators ,which the user can use while coding ,these operators have predefined meaning in the respective language i.e the operators can operate only on a specific set of variables/constants.Languages ...
Read Answers (2) | Asked by : Attique


 Sponsored Links

 
Related Articles

OOPS Tutorials

Object oriented programming OOP is a computer science term used to characterize a programming language that began development in the 1960’ s The term object oriented programming’ was originally coined by Xerox PARC to designate a computer application that describes the methodol
 

C++ Dereference Operator

C Dereference Operator In this C tutorial you will learn how to access the value of variables pointed by the pointer variables using pointer concept discussed in detail mosgoogle center It is possible to access the value of variables pointed by the pointer variables using pointer This is performed
 

C++ Operator Overloading Part II

C Operator Overloading Part II Operator overloading is a very important aspect of object oriented programming Binary operators can be overloaded in a similar manner as unary operators In this C tutorial you will learn about Binary Operating Overloading explained along with syntax and example mosgoog
 

sizeof Operator

What is sizeof operator? sizeof will return the number of bytes reserved for a variable or data type. The sizeof operator is a compile-time operator that returns an integer value. In other words since sizeof is a compile time operator, when used in a expression, it does not get compiled into executa
 

Modulus Operator

What is the functionality and restrictions of Modulus Operator? When a division is performed, the remainder of the operation is given by modulus operator. The modulus operator is denoted in c by symbol %. For instance we have two integer values x and y, the operation x % y called as x modulus y give
 

Operator, Operand and Expression in C

Operator, Operand, and Expression in are symbols which take one or more operands or expressions and perform arithmetic or logical computations. Types of operators available in C are as follows: Arithmetic Assignment Logical/relational Bitwise These have operators under each
 

Prefix and Postfix Operator

How does the prefix and postfix operator on expression? The operators present in prefix and postfix are prefix increment operator denoted by ++ prefix decrement operator denoted by -- postfix increment operator postfix decrement operator The difference between the two is that i
 

Sample Resume - Computer Operator Resume

Sample Resume Computer Operator Resume This article provides a sample resume format for those applying for the post of Computer Operator You can make use of this sample resume format while preparing your actual resume Computer Operator Resume mosgoogle Computer operator takes important tasks in an o
 

The Role of a Computer Operator

The Role of a Computer Operator Computers play a large part in our world today They are used for various personal and business reasons and many individuals would find it difficult to live without them For this reason computer related jobs are quite prominent in the job market There are various posit
 

The Inheritance Concept In OOPs

The Inheritance Concept In OOPs In object oriented programming objects will be characterised by classes It is possible to learn a lot about an object based on the class it belongs to Even if you are not familiar with the name Maybach If I told you it is a car you would immediately know that it has f
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape