SunQuest
 
       BrainDump
  Home arrow BrainDump arrow Page 3 - C: Operators
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
VeriSign Whitepapers 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

C: Operators
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2008-02-11

    Table of Contents:
  • C: Operators
  • Atoi Does Not Rhyme with All-Gooey
  • Relational Operators
  • Assignment Operators

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!

    C: Operators - Relational Operators


    (Page 3 of 4 )

    When you wish to compare operands, you use relational operators. While I am going to touch on these briefly here, I will go more in depth with them when we cover statements, such as If, While, and For.

    Here is a pretty table showing some of the relational operators:

     

    Operator

    What it Does

    Example

    <

    Less than

    1 < 2

    >

    Greater than

    2 > 1

    <=

    Less than or equal to

    1 <=1

    >=

    Greater than or equal to

    3 >= 2

    “==” (note: the quotations are added here for display purposes only; you do not include them in the operator)

    Equal to

    1 == 1

    !=

    Not equal to

    1 != 2

    Logical Operators

    As with relational operators, we will cover logical operators more in depth when we look at statements. For now, satisfy your curiosity with this brilliant table showcasing some of them:

     

    Operator

    What it Does

    Example

    &&

    Logical AND tests 2 conditions to see if they are true

    5 > 4 && 5 < 6

    ||

    Logical OR checks to see if any one of two expressions is true

    b <c || b <d

    !

    Logical NOT evaluates to true if the expression is false and false if the expression is true

    ! 2 > 3 (result would be true, as 2 is not greater than 3)

    More BrainDump Articles
    More By James Payne


       · Hey, thanks for stopping by to read my article on C operators. In this one we...
     

    BRAINDUMP ARTICLES

    - Codes and Packages in Microsoft Project 2007
    - Windows 7: Rumors and Demos
    - XP SP3 Why Me?
    - Breaking Up Your Work in Microsoft Project
    - Breaking Work into Task-Sized Chunks
    - Putting Microsoft`s Worldwide Telescope Unde...
    - Handling Multiple Contracts with Indigo
    - Cleaning Out Your Data in XP
    - Multiple Service Contracts and Indigo
    - Cleaning Out Your Programs in XP
    - Handling Metadata with Indigo
    - Building Blocks for a WCF Service Web Site
    - Help! I Need Some Remote Assistance
    - Using Service Templates with Indigo
    - Windows XP Tips for Task Manager

    Iron Speed




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway