Building an Executable Version of a C Program

A .c file is your source code file while a .exe file is an executable file, which is obtained after you successfully compile the code. For compilation you need compilers: Install GCC command line tools (e.g. Getting Started | MinGW) or some IDEs bundled with GCC (e.g. Code::Blocks) Install Visual C++ Express ( Download Overview I guess the smallest express version would do the job). […]

Read More

First C Program

Before starting the abcd of C language, you need to learn how to write, compile and run the first c program. To write the first c program, open the C console and write the following code: #include <stdio.h>     int main(){     printf(“Hello C Language”);     return 0;    }   #include <stdio.h> includes the standard input-output library functions. The printf() function is defined in stdio.h . int […]

Read More

Setting Up C Environment

In this chapter, we are going to learn Environment Setup using IDE in C development environment using DevC++ tool in your machine and how to compile and execute a C program on your own. Below topics are covered on this page. What is C compiler? List of C/C++ compilers for Windows Operating System Steps to install […]

Read More

C & C++ Content Details

Click to Download C C++ ContentDownload The C Language and its Advantages The Structure of a C Program Setting Up C Environment Writing C Programs  Building an Executable Version of a C Program  Debugging a C Program  Examining and Running a C Application Program Data Types and Variables  Data Types  · Operands, Operators, and Arithmetic […]

Read More

Functions

Quite often we need to perform a similar action in many places of the script. For example, we need to show a nice-looking message when a visitor logs in, logs out and maybe somewhere else. Functions are the main “building blocks” of the program. They allow the code to be called many times without repetition. […]

Read More

The “switch” statement

A switch statement can replace multiple if checks. It gives a more descriptive way to compare a value with multiple variants. The syntax The switch has one or more case blocks and an optional default. It looks like this: The value of x is checked for a strict equality to the value from the first case (that is, value1) then to the second (value2) and so on. If […]

Read More

Logical operators

There are four logical operators in JavaScript: || (OR), && (AND), ! (NOT), ?? (Nullish Coalescing). Here we cover the first three, the ?? operator is in the next article. Although they are called “logical”, they can be applied to values of any type, not only boolean. Their result can also be of any type. Let’s see the details. || (OR) The “OR” operator is […]

Read More

Loops: while and for

We often need to repeat actions. For example, outputting goods from a list one after another or just running the same code for each number from 1 to 10. Loops are a way to repeat the same code multiple times. The “while” loop The while loop has the following syntax: While the condition is truthy, the code from the loop body is […]

Read More

Conditional branching: if, ‘?’

Sometimes, we need to perform different actions based on different conditions. To do that, we can use the if statement and the conditional operator ?, that’s also called a “question mark” operator. The “if” statement The if(…) statement evaluates a condition in parentheses and, if the result is true, executes a block of code. For example: In the example above, the […]

Read More

Interaction: alert, prompt, confirm

This part of the tutorial aims to cover JavaScript “as is”, without environment-specific tweaks. But we’ll still be using the browser as our demo environment, so we should know at least a few of its user-interface functions. In this chapter, we’ll get familiar with the browser functions alert, prompt and confirm. alert Syntax: This shows a message and pauses […]

Read More