Home > Tag Archives: programming (page 3)

Tag Archives: programming

November, 2011

  • 11 November

    Connecting to a MySQL Database

    None of our previous PHP tutorials have dealt with a database yet, and that is for the sole reason that not everyone has access to a database, however for those who do this tutorial will teach you the basics on how you can connect to your database. We wont be covering SQL queries and the conversion of SQL queries into ...

  • 8 November

    jQuery 1.7 Released

    One of the internet's most popular Javascript libraries has been updated last week, bringing jQuery up to version 1.7. jQuery 1.7 can now be downloaded from docs.jquery.com/Downloading_jQuery. Alternatively, if you prefer a CDN, use any of the following URLs ...

July, 2011

  • 21 July

    Programming In C: Functions with Viewer Choice

    Using a Conditional inside a User-Defined Function If you want to give the viewer a choice of options, this can be handled either inside a user-defined function, or in the main( ) function. Let’s begin by handling viewer choice inside a user-defined function. In this example, a customer chooses how many books to order. The company uses this chart to ...

  • 5 July

    Programming In C: Built In & User Defined Functions

    There are several different types of functions in C. So far, we have used one type of function – the built-in C functions, like printf( ) and scanf( ). These functions are part of the C programming language. Another type is called a user-defined function. This is a function which the programmer creates and uses in a C program. We will learn ...

June, 2011

  • 16 June

    Programming in C: Information Storage, Variable Addresses and Viewer Input

    Information Storage We know that computers store information in memory. Each byte of information has a specific location in the memory area. This location is called the address. Whenever you use a variable, the value of the variable is stored in a specific address. This is why we used the ampersand & with the scanf function, like this: scanf(“%d”, &year); ...

  • 16 June

    Computer Number Systems

    Bits and Bytes Computers store information in bits, which are labeled 0 (empty) or 1 (full). A set of 8 bits is called a byte, like this: 1010 0010 Each byte has an address, which is labeled with a hexadecimal number, like this: C7.

  • 7 June

    Programming In C: Infinite and Nested Loops

    Infinite Loops If you want the viewer to decide when to exit a loop, use an infinite for loop. The infinite for loop sets no requirements inside the for statement, like this: for( ; ; ) Many people shop online, using the internet. Here is a program to help you keep track of how much money you’ve spent. In this program, ...

  • 7 June

    Programming In C: For Loops, Numbers and Pictures

    Listing numbers We can use for loops to perform various automated tasks. For example, if you want to list a set of numbers on the screen, simply use a for loop and the %d format specifier. This is post #12 of 25 in the series “Programming In C” The following series of tutorials are designed for people with little or no ...

  • 7 June

    Programming In C: Introducing For Loops

    A for loop repeats a function for a specific number of times. Increment and decrement For loops use increment and decrement operators. increment means to loop again, counting up (1, 2, 3, 4, …) The symbol for increment is++ decrement means to loop again, counting down (… 4, 3, 2, 1) The symbol for decrement is — This is post #11 of 25 in ...

  • 7 June

    Programming In C: While Loops

    While Loops A while loop repeats a function until a condition is met. Simple while loops Have you ever kept repeating a question until someone gives you the correct answer? (Teachers do this all the time.) This is called a while loop. For example, let’s ask the viewer what year C was developed. The correct answer is 1971, so if the viewer ...

  • 7 June

    Programming In C: Multiple Conditions

    Switch (Multiple Conditions) A switch is a function that handles multiple conditions and gives a different response to each condition. It is a very complex type of conditional. Switch If you ask a question that could have several different answers, and you want to give a different response to each answer, then you must use a switch. This is post #9 of ...

  • 7 June

    Programming In C: Special Conditional Operators

    Special Operators (Logical and Conditional) An operator is a function that performs a mathematical calculation, such as addition, or a logical calculation, such as or. Logical Operators In complex conditionals, we use logical operators to test whether multiple conditions are true or false. Here is a list of logical operators: &&  || !   and  or not   tests if two conditions ...

  • 7 June

    Programming In C: Simple and Nested Conditionals

    Simple Conditional, Nested Conditional A conditional is an if … else statement. For example: If you study, then you will succeed, or else you will fail.    This example has three parts: the condition: If you study, if the condition is met: then you will succeed, if the condition is not met: or else you will fail. Notice that there are different outcomes, whether ...

  • 7 June

    Programming in C: Variables and Strings

    Characters and Strings A character is a single letter, symbol, or number (from -128 to +127). The value of the character is stored in one byte of memory, so it must be very small. A string, however, can be any length of letters, words, or symbols, like a name or a sentence. Let’s learn how to handle both characters and strings in ...

  • 7 June

    Programming in C: Short and Long Variables

    Short and Long Integers, Double and Long Double Floating Points C provides special integer and floating point variables to handle short and long numbers. How you use these depends on how your computer’s memory stores information. Short and Long Integers When declaring an integer, you can use one of three variable types:   Type int short long     Value ...

  • 7 June

    Programming in C: Floating Point Variables

    Floating Point Variables, Working with Money, Viewer Input with Float, Constants Now that we understand integer varialbes, let’s learn about another type of number: the floating point. Floating Point Variables A floating point variable is a number with a decimal point value, like 5.34 or -345.98. This is post #4 of 25 in the series “Programming In C” The following series of ...

  • 7 June

    Programming in C: Working With Variables

    Declaring Variables, Integers, Working with Viewer Input, and Arithmetic Operators A variable stores information. In C, we use different types of variables to store different types of information, such as numbers, letters, or words. The variable holds the information until you are ready to use it. Declaring (Initializing) Variables Whenever you use a variable in a C program, you must let ...

  • 7 June

    Programming in C: Escape Characters and Tabs

    There is a set of special characters, called escape characters, which add special things to your printf statements. Escape characters begin with a backslash: \ and are followed by a letter or symbol, such as: newline character: \n tab indent: \t beep sound: \a This is post #2 of 25 in the series “Programming In C” The following series of tutorials are designed for ...

  • 7 June

    Programming in C: Directives and Functions

    When you write a C program in an editor (such as vi on Unix or Notepad on Windows), you are creating a source code. Every C source code has these parts: preprocessor directives main function body functions Let’s learn what each of these means and how they work. This is post #1 of 25 in the series “Programming In C” ...

  • 7 June

    Starting Off Programming in C

    The following series of tutorials are designed for people with little or no computer programming knowledge. They only require a basic understanding of either Windows or Unix and you must have a C compiler with an IDE, or you must understand how to use a plain text editor, such as vi (in Unix) or Notepad (in Windows). Each tutorial in ...

Like every other website, this site uses cookies to analyze our traffic. Cookies may also be utilized by our advertisers and partners. By using this website you agree to the use of said cookies. More Information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings, continuing to navigate past this message, or you click "Accept" below then you are consenting to the use of cookies on the Rapid Purple website.

Close