7,169 views 215 on YTPak
64 1

Published on 12 Apr 2013 | over 3 years ago

For more free Urdu Tutorials click here: bit.ly/ZcRlXc
Like us on facebook: on.fb.me/13Z3CqS
Follow us on twitter: bit.ly/13Z3LKP

This video is about C Programming Language Variables in Urdu. In this Urdu Tutorials Series I teach you how to program in C programming language.

Variables:
Variables are simply names used to refer to some location in memory -- a location that holds a value with which we are working. It may help to think of variables as a placeholder for a value.

The name of a variable can be composed of letters, digits, and the underscore character. It must begin with either a letter or an underscore. Upper and lowercase letters are distinct because C is case-sensitive. Based on the basic types explained in previous chapter, there will be following basic variable types:

Type Description
char Typically a single octet(one byte).
int The int type stores integers in the form of "whole numbers".
float A single-precision floating point value.

Declaration:
All variables must be declared before we use them in C program, although certain declarations can be made implicitly by content. A declaration specifies a type, and contains a list of one or more variables of that type as follows:
int i, j, k;
char c, ch;
float f, salary;

Though you can declare a variable multiple times in C program but it can be declared only once in a file, a function or a block of code.
Initialization

Variables are initialized (assigned an value) with an equal sign followed by a constant expression. The general form of initialization is:
variable_name = value;
Variables can be initialized (assigned an initial value) in their declaration. The initializer consists of an equal sign followed by a constant expression as follows:
int i = 100;

Loading related videos...