C Programming

C Structures

An array or a variable can store elements of same data type, but they cannot store data of multiple data types. C programming language provides with a user-defined data type called a Structure. Structure Definition “A structure is a group of different data types which may or may not be the same.”  Declaring a Structure …

C Structures Read More »

C Storage Classes

Variables point to a memory location that has an address and a value stored. Other than this value, a variable also has a storage class. The C storage classes decide the characteristics of a variable during the execution of a program – the characteristics are storage location, initial value stored, scope, the lifetime of the …

C Storage Classes Read More »

C Data Types

Data types are a very important concept in programming languages. You can choose the right kind of variable types for your program. The data types depend on the compiler which creates machine codes suitable for 16-bit or 32-bit processors. Sometimes when the processor has backward compatibility, then a 32-bit processor can run a 16-bit machine …

C Data Types Read More »

C Global And Local Variables

C program is a block of statements that are enclosed within { }. Each block has its own scope and it decides which variable to use that falls under its scope. In other words, two variables with the same name can exist in the same program if they are declared in different blocks. The variables …

C Global And Local Variables Read More »

C Variables And Constants

In a C program, some values do not change and some changes with the execution of the program. A constant never changes throughout the program and the variable changes frequently, hence the name. Types of Constants Constants can be classified into different types such as numeric constants and character constants. The following figure depicts the …

C Variables And Constants Read More »

C Macro Expansion

You learned about C preprocessor directives and its components earlier. These directive are of four types – macro expansion, file inclusion, conditional compilation ,and other miscellaneous directives. The macro expansion is the most common and popular C preprocessor directives. Before you begin, learn a bit about the preprocessor directives. If you are familiar with the …

C Macro Expansion Read More »

C Preprocessor Directives

There are a lot of components or processors involved inside or outside the C compiler that affects the compilation process. One of them is the C preprocessor. The preprocessor executes its own commands to the program before it is sent to the compiler for compilation. The preprocessor commands are called preprocessor directives. Though the directives …

C Preprocessor Directives Read More »

C Conditional Operators

In C programming language, sometimes it necessary to change the flow of the program.The C offers a special operator called a Conditional operator to do that. Before you start learning about the conditional operator, be familiar with C programming basics. Skip this step if you already know the basics. C program Structure How to install …

C Conditional Operators Read More »

C File Input-Output

Most of the programs we have seen so far involve static or dynamic memory. One of the features of C programming language is the ability to read and write files. The information is written to operating system files in binary format and later retrieved in the memory buffer to be read or written. This is …

C File Input-Output Read More »