Search results
Learn C. C is a general-purpose programming language that has been widely used for over 50 years. C is very powerful; it has been used to develop operating systems, databases, applications, etc. Start learning C now »
C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972. It is a very popular language, despite being old. The main reason for its popularity is because it is a fundamental language in the field of computer science.
Get Started With C. To start using C, you need two things: A text editor, like Notepad, to write C code; A compiler, like GCC, to translate the C code into a language that the computer will understand; There are many text editors and compilers to choose from. In this tutorial, we will use an IDE (see below).
A pointer is a variable that stores the memory address of another variable as its value. A pointer variable points to a data type (like int) of the same type, and is created with the * operator. The address of the variable you are working with is assigned to the pointer:
Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value. To create an array, define the data type (like int) and specify the name of the array followed by square brackets [].
A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. Functions are used to perform certain actions, and they are important for reusing code: Define the code once, and use it many times.
Learn C++. C++ is a popular programming language. C++ is used to create computer programs, and is one of the most used language in game development. C++ was developed as an extension of C, and both languages have almost the same syntax. Start learning C++ now »
Example. // Create variables. int myNum = 5; // Integer (whole number) float myFloatNum = 5.99; // Floating point number. char myLetter = 'D'; // Character. // Print variables. printf ("%d\n", myNum); printf ("%f\n", myFloatNum); printf ("%c\n", myLetter);
The switch expression is evaluated once. The value of the expression is compared with the values of each case. If there is a match, the associated block of code is executed. The break statement breaks out of the switch block and stops the execution.
Learn C#. C# (C-Sharp) is a programming language developed by Microsoft that runs on the .NET Framework. C# is used to develop web apps, desktop apps, mobile apps, games and much more. Start learning C# now ».