Register    Login    Forum    Search    FAQ

News News of C Language

Site map of C Language » Forum : C Language


Message
 Post subject: switch case
PostPosted: Thu Jul 23, 2009 11:32 pm 
Switch case statements are a substitute for long if statements that compare a variable to several "integral" values ("integral" values are simply values that can be expressed as an integer, such as the value of a char). The basic format for using switch case is outlined below. The value of the variable given into switch is compared to the value following each of the cases, and when one value matches the value of the variable, ...

Read more : switch case | Views : 46 | Replies : 0

Top
 Post subject: Functions
PostPosted: Thu Jul 23, 2009 11:31 pm 
Now that you should have learned about variables, loops, and conditional statements it is time to learn about functions. You should have an idea of their uses as we have already used them and defined one in the guise of main. Getchar is another example of a function. In general, functions are blocks of code that perform a number of pre-defined commands to accomplish something productive. You can either use the built-in library functions or ...

Read more : Functions | Views : 12 | Replies : 0

Top
 Post subject: If statements
PostPosted: Thu Jul 23, 2009 11:29 pm 
If statements

The ability to control the flow of your program, letting it make decisions on what code to execute, is valuable to the programmer
. The if statement allows you to control if a program enters a section of code or not based on whether a given condition is true or false. One of the important functions of the if statement is that it allows the program to select an action based upon the ...

Read more : If statements | Views : 16 | Replies : 0

Top
 Post subject: Programming tricks
PostPosted: Thu Jul 23, 2009 11:26 pm 
Back on the Z80 chip, if you wanted to load zero into a register, you XOR'd the register with itself. It gave the right answer, the ones became zeros and the zeros stayed zeros. But why do it in this obscure way, when there was a "move" 0 to the register? The answer is that it only took one byte of memory, and it was faster. If your program had to do it a million ...

Read more : Programming tricks | Views : 17 | Replies : 0

Top

Last 10 active topics


Operating Systems (Windows, Unix-Linux, Mac & Others)

No new posts How to remove this mac keylogger?

Tips & Tricks

No new posts Tips of block sites on your computer

NET (VB.net, ASP.net, C#)

No new posts Multithreading with Windows Forms

Domain Registrations

No new posts Know About DNS (Domain Name System)
No new posts Know About Domain Names
No new posts 10 things to look for in a domain registrar
No new posts Largest ICANN Registrars : Top Domain Registrars by Total Domains

Hosting Solutions

No new posts Virtual Private Server Providers
No new posts Dedicated Hosting For Beginners
No new posts A Quick Overview of Reseller Hosting

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 152 | Total topics 149 | Total members 25



Your Ad Here
cron