Data Type in C Language - tccicomputercoaching.com
seen from United Kingdom
seen from Türkiye

seen from United States

seen from United States

seen from United Kingdom

seen from United Kingdom
seen from South Korea

seen from United Kingdom
seen from Poland

seen from United Kingdom
seen from United Kingdom

seen from Poland
seen from Russia

seen from United Kingdom
seen from China

seen from United Kingdom
seen from Belarus
seen from United Kingdom
seen from United Kingdom
seen from United Kingdom
Data Type in C Language - tccicomputercoaching.com
What is Data Type and Why Data Type Need? In programming there are different types of data used for example 987,876.34, xyz, Hello World, %, # etc. As a human being we can differentiate that these …
What is Data Type and Why Data Type Need?
In programming there are different types of data used for example 987, 876.34, xyz, Hello World, %, # etc.
Data Type in C Language-tccicomputercoaching.com
What is Data Type and Why Data Type Need?
In programming there are different types of data used for example 987, 876.34, xyz, Hello World, %, # etc.
As a human being we can differentiate that these all data are different but machine can't differentiate data, so, to differentiate data they have been categorized in different categories which are called data type.
ANSI C provides three types of data types:
1. Primary (Built-in) DataTypes: void, int, char, double and float.
2. Derived DataTypes: Array, References, and Pointers.
3. User Defined DataTypes: Structure, Union, and Enumeration.
1. Following are Primary Data Types in C:
· void - means nothing. void is always used with main function. That mean void function does not return any value.
· int - 0-9 digit (combination) i.e. 99999 , 10 , 0 , 23456
· float - Real Number i.e 78.91
· char -There are 4 sub categories:
o 0-9
o a-z
o A-Z
o other symbols
· Note: character contains only single value
· string - Is collection of character but C language does not allow to declare string as a data type.
Data Type is always used in variable declaration in beginning in void main.
data type name;
For example,
int rollno;
float salary;
char code;
2. Following are Derived Data Types in C:
Derived Data type is based on Primary data type.
Arrays - Arrays are sequences of data items having homogeneous values.
References - Function pointers allow referencing functions with a particular signature.
Pointers - These are powerful C features which are used to access the memory address
3. Following are User Defined Data Types in C:
C allows the feature called type definition which allows programmers to define their identifier that would represent an existing data type. There are three such types:
· Structure
It is a package of variables of different types under a single name. This is done to handle data efficiently. "struct" keyword is used to define a structure.
· Union
These allow storing various data types in the same memory location. Programmers can define a union with different members, but only a single member can contain a value at a given time.
· Enum
Enumeration is a special data type that consists of integral constants, and each of them is assigned with a specific name. "enum" keyword is used to define the enumerated data type.
To learn more about C Language at TCCI
Visit @ http://tccicomputercoaching.com/
Call @ 9825618292
Data Type in C Language-tccicomputercoaching.com
What is Data Type and Why Data Type Need?
In programming there are different types of data used for example 987,876.34, xyz, Hello World, %, # etc.
As a human being we can differentiate that these all data are different but machine can’t differentiate data, so, to differentiate data they have been categorized in different categories which are called data type.
ANSI C provides three types of data…
View On WordPress
What is Loop in Programming? To write once, but execute more than one time is called Loop in Programming. This will save time of developer to write n time. 3 type of Loop: for while do-while We see…
What is Loop in Programming?
To write once, but execute more than one time is called Loop in Programming. This will save time of developer to write n time.
Loop in C Language - tccicomputercoaching.com
What is Loop in Programming?
To write once, but execute more than one time is called Loop in Programming. This will save time of developer to write n time.
3 type of Loop:
à for
à while
à do-while
We see one by one in detail.
There are 3 sections in each loop:
there is loop variable i/j
1. initialization i=1 or i=10
2. condn check i<=10 or i>=1
3. update (++ or --) i=i+1 or i++ i--
e.x. We want to print 10 time "hello world". Then what is the syntax in coding?
Let us see.
1. for loop
for (i=1;i<=10;i++)
{
Printf ("hello world\n");
}
Here, all 3 sections are in same statement. First initialization executed always. Then control goes to the condition checking. If condition is true then only control entered into the loop and statement inside the loop will be executed. Then control goes to the updating, again condition checking , and same process will continue until condition will be false.
2. While Loop
i=1; while(i<=10)
{ printf ("hello wolrd\n");
i++;
}
Here , initialization is outside of Loop. Then control goes to the condition checking. If condition is true then only control entered into the loop and statement inside the loop will be executed. Then control goes to the updating, again condition checking , and same process will continue until condition will be false.
3. do -while Loop
i=1;
do
{ printf ("hello wolrd\n");
i++;
} while (i>=10);
Here, also initialization is outside of Loop. But in this Loop condition is last , so control direct enter into the loop and one time statement inside the loop will be executed. Then updating and last control rich to the condition checking. If condition is true then control again entered into the loop , and process will be continue until condition will be false.
Thus , Do - While loop is different than previous two loop. Here condition is last , so , if condition is false yet output will execute one time. When in previous two loop condition is false then output will not execute once.
Second difference is : in do-while there is semi colon at last.
TCCI is located in developing area of city - Bopal and heart of City Satellite area in Ahmedabad.
Our course include all Computer course, Web Designing Course, Project Training, Basic Computer Course, Programming Course etc.
We have team of qualified and experienced Faculties who teach all important subjects of Civil Engineering, Mechanical Engineering, Computer-IT Engineering, EC Engineering, Electrical Engineering, EEE Engineering , Maths Course etc
We teach computer subjects to school students from class 1 to 12th (any Board).
Main advantage of TCCI is "Lecture as per student flexible time".
For more information about TCCI.
Call us @ 9825618292
Visit us @ http://tccicomputercoaching.com/
Loop in C Language - tccicomputercoaching.com
Loop in C Language – tccicomputercoaching.com
What is Loop in Programming?
To write once, but execute more than one time is called Loop in Programming. This will save time of developer to write n time.
3 type of Loop:
for
while
do-while
We see one by one in detail.
There are 3 sections in each loop:
there is loop variable i/j
1. initialization i=1 or i=10
2. condn check i<=10 or i>=1
3. update (++ or –) i=i+1 or i++ i–
e.x. We want to print…
View On WordPress
Maths Coaching Class in Bopal-Satellite-Ahmedabad-tccicomputercoaching.com