C-Language

Communicating with Computer involves speaking the language the Computer understands, which immediately rules out English as the language of Communication with computer. However, this is a close analogy between learning english language and learning C-Language. The Classical method of learning English and C-Language. The classical method of learning english is to first learn the Alphabets or Characters used in the language. then learn to combine these alphabets to form words, which in turn are combined to form sentences and sentences are combined to form paragraphs. Learning C-Language is similar and much more easy.

Therefore, instead of straight-away learning how to write programs, we must first know which alphabets, numbers and special symbols are used in C. Then how using these data types, constants, variables, and keywords are constructed. And finally now how are these combined to form an instruction. A group of instructions would be combined later on to form a program. This illustrate in the Figure above.

The C Character Set

A character denotes any alphabet, digit or special symbol used to represent information. Following table shows the valid alphabets, numbers and special symbols in C:

AlphabetsA,B,C,D…………X,Y,Z
a,b,c,d…………..x,y,z
Digits0,1,2,3,4,5,6,7,8,9
Special Symbol~ ‘ ! @ # $ % ^ & * ( ) _ – = + \ [ ] { } | : ; < > ? ?/ . ,

Data Types

‘Data’ is possibly one word which has been used with gay abandon b programmers. It is almost impossible for a programmer to talk for two minutes about computing without saying data in one context or the other. There are data types, data objects, data structures, data flow, data bases, data corruption, datavalidation, and so on. All of which are parts of the Data processing. Here however we are concerned with only a part of jargon – the “data types”.

There are fundamentally different types of data in C Programming – integer and floating point. From these two we can derive two others – character and double precision. There also exists a data type called void, which isn’t used as often as the other four. The bytes occupied by each each of these data types as well as the name used to refer to them is shown in figure below.

Data Type MeaningSize (bytes)
CharA character 1
Int An Integer2
FloatA single precision real number4
DoubleA double precision real number8
VoidValueless0

Data Types: Brief Description

Char is use to store any character belonging to the Character seen earlier.
INT type is use to store positive or negative integer.
A float data types stores a single precision floating point number.
A double data type can store a floating point value with a greater exactness than a float. Hence it is usually requires twice as much as storage space as a float does.
The use of double does not guarantee to double the number of significant digits in our results. But it improves the accuracy of the arithmetic and reduces the accumulation of rounding errors.
The data type Void is used to specify an empty set of values.

These data types together are often known as Primary data types. Several other data types can be derived from these Primary data types. Such data types are known as Secondary data types or derived data types. The figure below is showing the following data types.

FOR MORE HELP

CONTACT US

VISIT

TeamSOFTLINE777

Related Posts