learn c language

Operator precedence and associativity in C Language

Operators Precedence in C Operator precedence determines the grouping of terms in an expression and decides how an expression is evaluated. Certain operators have higher precedence than others; for example, the multiplication operator has a higher precedence than the addition operator. For example, x = 7 + 3 * 2; here, x is assigned 13, […]

Type conversion in C Language

Type casting is a way to convert a variable from one data type to another data type. For example, if you want to store a ‘long’ value into a simple integer then you can type cast ‘long’ to ‘int’. You can convert the values from one type to another explicitly using the cast operator as […]

Operators in C Language

An operator is a symbol that tells the compiler to perform specific mathematical or logical functions. C language is rich in built-in operators and provides the following types of operators − Arithmetic Operators Relational Operators Logical Operators Bitwise Operators Assignment Operators Misc Operators We will, in this chapter, look into the way each operator works. […]

Storage classes in C Language

A storage class defines the scope (visibility) and life-time of variables and/or functions within a C Program. They precede the type that they modify. We have four different storage classes in a C program − auto register static extern The auto Storage Class The auto storage class is the default storage class for all local […]

Variables and memory locations in C Language

A variable is nothing but a name given to a storage area that our programs can manipulate. Each variable in C has a specific type, which determines the size and layout of the variable’s memory; the range of values that can be stored within that memory; and the set of operations that can be applied […]

Fundamental data types in C Language

Data types in c refer to an extensive system used for declaring variables or functions of different types. The type of a variable determines how much space it occupies in storage and how the bit pattern stored is interpreted. The types in C can be classified as follows − Sr.No. Types & Description 1 Basic […]

Standard I/O in C Language

When we say Input, it means to feed some data into a program. An input can be given in the form of a file or from the command line. C programming provides a set of built-in functions to read the given input and feed it to the program as per requirement. When we say Output, […]

Components of C language

You have seen the basic structure of a C program, so it will be easy to understand other basic building blocks of the C programming language. Tokens in C A C program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol. For example, […]

Object and executable code in C Language

Source code is the C program that you write in your editor and save with a ‘ .C ‘ extension. Which is un-compiled (when written for the first time or whenever a change is made in it and saved). Object code is the output of a compiler after it processes the source code. The object […]

Syntax and logical errors in compilation in C Language

As such, C programming does not provide direct support for error handling but being a system programming language, it provides you access at lower level in the form of return values. Most of the C or even Unix function calls return -1 or NULL in case of any error and set an error code errno. […]

1 9 10 11 12