Category Archives: Computer Programming

C Increment and Decrement Operators


Programs coded with short-hand operators can run several milliseconds faster. Same as increment and decrement operators. They are — (minus minus) and ++ (plus plus). The following example shows the usage of these two operators: x = y + z++; … Continue reading

Posted in Computer Programming | Tagged , , , | Leave a comment

C Advanced Operators


There are some advanced operators in C. First set of these operators is the Assignment Operators. Here are five operators presented in the arithmetic assignment operators: += (Plus Equals) -= (Minus Equals) *= (Multiply Equals) /= (Divide by Equals) %= … Continue reading

Posted in Computer Programming | Tagged , , | Leave a comment

C String and Character Functions Samples


Here are the exercises I did for the string and character functions: /* * * exercise1.c * * Allow user to input a string from the keyboard and * display the ASCII value for each character * * by Robby … Continue reading

Posted in Computer Programming | Tagged , , , , | Leave a comment

C Character Functions


There are several types of character functions in the standard C library. One type of character functions is character classification functions. They are isuppper, islower, isdigit, isspace, and other boolean functions. For example, if (isupper(ch)) determines whether ch is upper … Continue reading

Posted in Computer Programming | Tagged , , , , , , , , , , | Leave a comment

More C Strings Input and Output Functions


For the input function, the gets function is much more simpler to use than the scanf function. The scanf function is often used in the advanced C programs. The same is for the output function. the puts function is more … Continue reading

Posted in Computer Programming | Tagged , , , , , , , , | Leave a comment

C Arrays


An array is a variable that represents a collection of the same variable types. For instance, a collection of doubles is an array. It can also declare one variable as an array. The size of an array depend on the … Continue reading

Posted in Computer Programming | Tagged , , , , | Leave a comment

C Special Loops


There are two special loops in C: Nested loop – a loop inside of another loop, also called a loop within a loop. The forever loop – a controlled infinite loop Here is a sample code for the nested loop: … Continue reading

Posted in Computer Programming | Tagged , , , , , | 1 Comment

C break and continue


break and continue are two keywords that used in loops. They control the flow inside the loops. Below shows how these keywords work inside a block of code: // break while (condition1) { statements…; if (condition2) break; statements…; } // … Continue reading

Posted in Computer Programming | Tagged , , , , , | Leave a comment

C do…while Loop


The do…while loop is the third type of loop for C and other programming languages. This type of loop is not very often used. It’s similar to the while loop. Here is the format of the do…while loop: do { … Continue reading

Posted in Computer Programming | Tagged , , , , | Leave a comment

C for Loop


The for loop is used when the number of time the loop repeated is specified. The format of the for loop is: for (initialization; condition; increment) { statements; } The following steps show how the for loop is executed: Initialize … Continue reading

Posted in Computer Programming | Tagged , , , | Leave a comment