.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

What is the prefix and postfix in c#

Posted By :NATHAN ISRAEL     Posted Date :October 11, 2011    Points :40   Category :C# 
++ and -- operators can be used as prefix and postfix.

Prefix:
num1=3;
num2=++num1 //num1=4, num2=4

The Compiler will first increment num1 by and then will assign it to num2

postfix:
num2=num1++ //num1=4, num2=3

The Compiler will first assign num1 to num2 and then increment num1 by 1



You can also find related Interview Question to What is the prefix and postfix in c#  below: 

Convert the expression ((A + B) * C - (D - E) ^ (F + G)) to equivalent Prefix and Postfix notations.

  
Prefix Notation:
^ - * +ABC - DE + FG

Postfix Notation:
AB + C * DE - - FG + ^ (More...)

What is the difference between Prefix and Dictionary compression?

  
Prefix only restricted to one column where as dictionary is applicable to complete page (More...)

What is the x: prefix?

  
The x: prefix is actually used to map XAML XML namepace defined at http://schemas.microsoft.com/winfx/2006/xaml. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend