Friday, January 25, 2019

C Characters Sets and C Tokens

Characters Set In C     

 

C Character Set:-

A C program is a collections of number of instructions written in meaningful order.
Further instructions are made up of Keyword, Variables and Functions etc which
uses the C character set defined by C. It is collections of various characters, digits, and symbols which can be used in a C program. It comprises followings below:-
 
Symbols In C

‘C’ Tokens:

Smallest individual unit in a C program is called C token. Our C program are
building by using these tokens. They are use in C program in different-different
ways. In C there are five types of tokens as followings below:-

Token In C    

1.Keywords:-

Keywords are those words whose meaning has already been known to the system or compiler. That is meaning of each keywords is fixed. You can only use the keyword for its predefined meaning. You cannot change the meaning of
keywords. Also you cannot use keywords as names for Variables, Functions. Arrays etc. All the keywords are written in small case letters. In C 32 keywords are available as followings below:- 

Keywords In C   

2.Identifiers:-

Identifiers are names given to various program elements like Variables, Structures,Union, Constants -names, Macros etc.
Rules for writing identifiers as followings below:-
1. First letter must be an alphabet or underscore (   _   ).
2. From second character onwords any combinations of digits, alphabets, or underscore is allowed.
3. Only digits, alphabets, underscore, are allowed. No other symbols is allowed.
4. Keywords cannot be used as identifiers.
5. For ANSI (American National Standard Institute) C maximum length of identifiers is 32,but  many compiler support more than 32.
Examples of Valid and Invalid Identifiers (On the basis of above rules):-

Valid and Invalid Identifiers  

3.Constants:-

Constants in C programming language refer to fixed values that do not change during the execution of a program. There are various types of constants in C. They are classified into followings categories as below:-


Constant In C  

1. Numeric Constants:- There are two types of numeric constants as followings below:-
A. Integer Constants:- Integer constants also have further types as followings below:-
       a. Decimal Constants:- They are sequence of digits from 0 to 9 without fractional
             part. It may be negative, positive or zero.
             Example: 22, 817, -8137, 0.
       b. Octal Constants:- They have sequence of numbers from 0 to 7 and first digit
             must be 0.                           
             Example: 045, 0, 0671, 028.
      c. Hex Decimal Constants:- They have sequence of digits from 0 to 9 and
           (Represents 10 to 15). They start with 0x or 0X.
            Example: 0x37, 0xab17, 0X81AB.

B. Real Constants:-They are the number with fractional part. They also known as floating
      point constants.
      Example: 45.67, 0.78, 5.278.
      Real constants can be also be represented in exponential or scientific notation which
      consists of two part. For example the number 212.345 can be represented as
      where e+2 means 10 to the power 2. Here the portion before the e that 2.12345 
      is is known mantissa and +2 is the exponent.

2. Non Numeric Constants:- They are two type as followings below:-
A. Single Character Constants:-They are enclosed in single quotes.They consists of 
      single character or digit. Character constants have integer values known as ASCII
      (American Standard Institute Code for Information Interchange)values
      Example:ASCII value Of A is 65.
                        
B. String Constants:- They are sequence of characters, digits, or any symbols enclosed 
      in double quotes.
      Example: “Hello World”, “15 August 1947”, “Hello C 1978”, “145.18891B”.

Backslash Constants:- C defines several backslash character constants which are used 
for special purpose. They are called so because each constants start with backslash (\).
They are represented with 2 characters whose general form is \char but treated as a single character. They are also called escape sequences. You will see their usage in others post.
Backslash constants are as followings below:-


Backslash Constant In C


4.Operators:- 
The operators are the symbols, they performs operation with operands
Example: 12+14
Here 12 and 14 are operands and + is Arithmetic operator that will generate results 26. We will learn more about Operators and Operands in Next Post. Operators are as followings below:-


Operators In C


5.Special Symbols:- 

They are also known as separators. They are use in our  program like Arrays, Functions and Function, Structure, Union and Others Blocks of  Codes.
They are three type followings below:-

Special Symbols In C



Wednesday, January 9, 2019

Overview Of The C Programming Language

Overview Of The C Programming Language

C Programming language:-

C is a programming language developed in 1972 at AT & T Bell Laboratories, Murray Hill, New Jersey, of United State America. It was designed and written by Dennis Ritchie. C is general purpose programming language with lots of features. It is called middle level programming language because it is combination of High Level Programming Language and Low Level Assembly & Machine Programming Language.
C language have some high elements from High Level Programming Language and with the control and functionality of Assembly & Machine Language.
C programming language provide a relatively good programming efficiency and relatively good machine efficiency.
Initially it was designed for programming of a operating system called UNIX operating system and the tools supplied with it including the C compiler itself are written in C.
C is a structured programming language which allows variety of programs in small modules(functions). C follows Top-Down Programming Approach to design and writing a program.
C programming language is easy and convenient to learn, understand and implements. C language covers most of all programming languages basic features so if you had learn C language then will be easy to learn others programming languages.

History C Programming language:-

1. In the 1960 a programming language is developed is called Combined Programming Language at Cambridge University. 
2. Later on also a new programming was developed is called Basic Combined Programming Language (BCPL) by Martin Richards at Cambridge University.
3. After sometime a new Programming Language called B Programming language was invented by Ken Thomson come into existence.
4. In 1970 Dennis Ritchie inherited the features of B & BCPL Programming Language and did add some new features and developed a new language that is "C" Programming Language.
5. C was developed on DEC PDP-11 Machine That used the UNIX operating system.
6. In 1978 C Programming Language first time described in the book as title "The C Programming Language " by Dennis Ritchie.
7. The ANCI (American National Standards Institute) was finally adopted C Programming Language in December 1990 for standardized the C  language in the market.

Features, Characteristics C Programming language:-

1. C programming language is reliable ,simple,and easy to learn, understand and use for anyone interested.
2. C programming language in combination of High-Level Programming Language & Low Level Programming Language both features in it.
3. The C programming language supports user defined data types (Structure &Union).
4. The C Programming supports modular and structured programming concepts to design C Programs, In C language we can easily read and write our own functions.
5. The C programming language supports a rich library of predefined functions that can be easily used by the programmers.
6. It supports pointers with pointers operations this feature allows programs to access memory addresses directly where variables are stored and to perform Bit level manipulations of data stored in memory processor register.
7. It provide low level memory and device access feature making it suitable for writing programs.
8. It is a small and concise language providing easy way translating language codes int corresponding efficient machine language code.
9. It is standardized by the several international body making C programs easily portable from one computer to another computer.

Why C Programming language is important:-

1. Oracle Database management System is written in C programming language.
2. Core libraries of trending hot technology Android are written in C programming language.    
3. MySQL Database Management System is written in C programming language.
4. Almost every device driver are written using C programming language.5. Major part of almost web browser is written in C programming language like Google Chrome, Apple Safari,Opera.
6. UNIX operating system is developed using C programming language.
7. C is world’s most popular programming language, but having some parameters.

Student point of view:-
1. C programming language is important to build programming skills at beginning level for anyone.
2. C programming language covers basic features of all programming languages so it also help to learn others programming languages.
3. C language is also helpful in campus recruitment process to getting job in company.
4. C language is the most popular language for hardware dependent programming.
 

 




The Overview A Data, Information, Instruction, Program, Software

The Overview A Data, Information, Instruction, Program, Software

What is data?

Data is any unstructured and unorganized raw facts like texture, images, video-clips, audio, sound-signals etc. Data are stored in computer memory in many ways according to theirs type like a text and image will stored in memory in forms of characters and Pixels formats likewise to user point of views, but all the types are internally converting and process as same procedure in computer system.
We stored data in computer memory for many purposes, like make Information using data, generate results using  data or information bundle, and make records for users of computer, data are also used for data manipulations, data analytics, Data Science etc.
Every data in computer world internally converted into many sequencing combinations of two Binary Digits that is of 0's and 1’s. Data is more important in computer world and real world than others. We cannot things anything without using data in computer science.
Computer world based on data.

What is information?

The data that represented in very well defined and organized manner in computer system we called them Information, that may be different types of data. The structured manner of data also known as information. Information are nothings but all about the data because whenever we finds data as well defined manner and some meaningful order we called them information.
Information is prepare by using collections of raw and unorganized data. information are actually used by the user or end users of computer in theirs different-different purposes. We can easily analysis and study anything by using information than data. Information are arrange in particular ways that can be easily trace and analysis and understand by the users.

What is instruction?

The arrangements of the data in a particular order or well defined and predefined structured manner that give to the computer system for performing any task are called Instruction, then Computer system  understand or read the instructions step by step(linear fashion) and process in internally and then give output to it's user.
So arrangement of data to giving to a computer system to performing operation is called instruction for a specific task that user want from computer system. For accomplished any task by computer we prepare specific instruction.
So instruction are just data that are arranges in a order to instructs the computer system for a particular job or task. The instructions are written by the using Computer Languages.

What is program?

The set of instructions is called Program that are written by using computer programming(computer languages) language to performing different-different task, actions, functions, or services that user wants. To writing a computer program computer, computer Programming languages require.
There are different-different programming language are available in the computer world every language ware designed to do some specific purpose or task. COBOL, PASCAL, BASIC, C, C++, Java, C#, Swift, JavaScript,Python,PHP etc are popular programming languages. The process of writing program and executes is called programming.The people who writes programs is known as Programmer.

What is Software?

The collection of programs are called software. The purpose of designing and building a software is to solve a real world problem by using software by help of computer system. The software are building to management of system like banking system, railways reservation system, educational system, airline ticket system etc.



 

 

Sunday, January 6, 2019

Introduction to computer language

c, programming, language, computer language, c tutorials
c

What is language? 
The languages are way to communication to the another person, we use languages for sharing or expressing our thoughts, views, ideas, knowledge and opinion to the peoples. The languages are play very important role in our daily life. The languages are the way to understand anything in the world in very easily because it is easy to understand and understand by the people.We use many language in our daily life like English, Hindi, Germany, french etc for communicate to the another persons.

How many types of languages we use?
There are mainly two types of languages that we are use.
1. Natural or Human Languages
2. Computer Languages

Natural Languages:
The languages which are used to communication between human to human is called natural language like Hindi, English, French, Germany etc. The language are very important in our life without language we cannot effectively and easily shares or expressing our thoughts, ideas, knowledge that are on our mind to the another person. The languages are the ways to understand easily anything in the world. 


Computer Languages:
We all know that the computer system cannot understand the natural or human speaking languages because they are just machine they have no any emotions and feeling to understand anything like human being. Whenever we wants computer do something for ours desired purpose then first of all we need to give instruction to computer languages in their understandable language that language are know computer language. So we use computer languages to communication between human to computer system. there are many computer language in the world like C , C++, Java, Python, Ruby, COBOL, ALGOL etc. 

Type of computer languages:-
1. Machine Language
2. Assembly Language
3. High Level Language

Machine Language:
Machine language is called the language of computer that the computer system understand only. The machine language in the computer world is represented by the consists of two binary digits that 0's and 1's.The machine language is written by using these sequence of combination of two binary digits 0’s and 1’s.
In machine language whenever we want computer do something, then we write everything by using combinations of 0’s and 1’s sequences. Using this language whatever you want to input to computer  has to be supplied in the forms of sequence of of 0’s and 1’s .
For Example: character A May be represented as 01100101 ,0 itself may be represented as 01001000 and so on.
Features of this languages are:-
1. The machine language consists of sequence of two binary digits that is of 0’s and 1’s.
2. Machine languages are called natural languages of computers.
3. The machine instruction(code) internally converted in sequences of combinations 0's and 1's that further also converted into electric signals.
4. Each and every instruction, command or operation must be stated in the form of sequences 0's and 1's.
5. Execution of program is very fast if the instruction were written in machine language (instructions) because they are directly understand by the computer system.
6. Machine language (instructions) are the are machine dependent.
7. Machine language is  difficult to write(programs), and very tough modify and error finds from it.
8. The machine language does not required any translator. 
Assembly Language:
Assembly language are commonly called  assembly, asm or symbolic languages. The assembly languages are machine languages but they use some human readable symbols or  code that will easily understand by the human being.
The assembly languages use some human-readable notation for the writing instruction for the computer system. The assembly languages are the depends on computer system architecture, different- different machine supports different assembly languages for process instructions.
In the assembly languages having separate translator to converted instruction to the corresponding machine languages.
The translator are used to converts assembly language instructions to machine language instructions is called assembler. In assembly language symbolic notation are called mnemonics or asm codes.

Features of this languages are:-
1. In the assembly language mnemonics code or notations is used to write  instruction or  programs for computer system, they are small words like Add, Sub, Mul, Div which represent addition, subtraction  and division etc.
2. For writing instructions or programs set of mnemonics are made fixed for a specific  type of machine or computer systems. The instructions are written using these mnemonics but internally converted(translated) into machine language instruction. 3. For translating a assembly instruction into machine instruction a translator is required is called assembler of that language. In assembly language world each and every assembly language have a different-different assembler.
3. Assembler is any system software which is specific for a specific machine.
4. Assembly languages are Easier to understand and modify and error finding.
5. Assembly languages are Easy to locate and correct errors.
High-Level Language:
The high level language is combinations of machine and assembly languages. We have seen that assembly language and machine language, require deep knowledge of computer hardware where as in high level language require you to you
have to know only the instruction like  English languages words.
High level languages are simple languages that are use English like words and mathematical symbols like +, - ,%, /,* etc for its program constructions. High level languages enables programmer to concentrate more on the logic and less on the syntax. In the high level languages also require translator for converting  instruction or program in corresponding machine language instructions is called compiler of interpreter.
Features of this languages are:-
1. In high level languages program are written in simple English like language.
2. In high level language programmer are more concentrate on the programs logic and don't worry about hardware configurations.
3. In high level language every instruction of program is translated into corresponding machine language instructions.
4. High level language are easy write and use and modify.
5. In high level language have very less error prone.
6. In high level language a separate translator is required.