Showing posts with label C Tutorial. Show all posts
Showing posts with label C Tutorial. Show all posts

Friday, December 19, 2008

How to write instruction in C

In the previous topics we have learnt about the different types of constants, variables and keywords, now its time to learn about the logical step to form an instruction by combining them. Basically there are four types of instructions in C language, they are as follows:
  1. Type declaration instruction
  2. Input/output instruction
  3. Arithmetic instruction
  4. Control instruction

Thursday, December 18, 2008

Keywords used in C

It is an obvious thing that to the beginners, first the question will arise what is keyword, so it is preferable to first explain the meaning of keyword, for the beginner reader, and as this blog is for all types of reader so we should also keep in mind about the beginner readers.

Wednesday, December 17, 2008

Rules for constructing variable name in C language

Though the rules for constructing different types of constant are different,yet the rules of constructing different types of variable are same, which are as follows:
1. The length of a variable name should be minimum of one character and maximum of 8 character. Some compiler also allow variable name up to forty characters.
2. Only alphabet, digits and underscore can be used to name a variable.

Tuesday, December 16, 2008

Types of variables in C language

A quantity that varies its value is called a variable or simply we can say variable is a name given to the memory location where different constants are stored, these locations may store a integer or a real or a character constant or any other types of constants.

Monday, December 15, 2008

Rules for constructing Character Constants

The rules for constructing a character constant are a follows:
1. A character constant is nothing but simply an alphabet, or a single digit or a single special symbol enclosed with in single inverted commas.
2. The maximum length of a character constant is one character.

Sunday, December 14, 2008

Rules for constructing Real Constants in exponential form

Normally in arithmetic also we have seen that the exponential form is represented in two parts, one is called mantissa part and the other is called the exponent part. The part which is written before the ‘e’ is called the mantissa and the part which is written after it is called the exponent part. {also see: Rules for constructing Real Constants}


Rules for constructing Real Constants

Real constants or floating point constants could be written in two forms,
a) Fractional form
b) Exponential form
{also see: Rules for constructing Real Constants in exponential form}

Saturday, December 13, 2008

Rules for constructing Integer Constants

1. An integer constants must have at least one digit.
2. It must not have a decimal point.
3. It could be either +ve or –ve.
4. If no sign precedes an integer constants it is assumed to be positive.

Friday, December 12, 2008

Thursday, December 11, 2008

Constants, Variables and Keywords used in C

When alphabets, numbers and special symbols are properly joined, they form keywords {also see: Character set used in C}. Let us now study about the “constants” and “variable” used in C language. Almost all of us know that constants are quantities that don’t change their value and variable are the quantities that change their value. Variables are the name given to the memory location where the constants are stored. {also see: Types of C constants}

Wednesday, December 10, 2008

Character set used in C language

Any alphabet, digits or special character denotes a character set. The list given below shows the valid alphabets, numbers and special symbols used in C:

Tuesday, December 09, 2008

Getting started with C

As a person requires a language to communicate with another person to express his or her feeling, so as a language is required to communicate a person or a user to communicate with computer. But to communicate with a language on has to maintain its proper grammar to  make understand his or her own feeling to the opposite person. So as a person or a user also have to maintain the grammars to make understand his or her desire to the computer. As there can be many forms of language to communicate, such as English, Spanish, German etc, so as C is also a computer language among many other languages such as BASIC, PASCAL, COBOL, JAVA, VB etc. {Also see: Introduction to C language}

Tuesday, December 02, 2008

Introduction to C language

C is a programming language and was originally developed by Dennis Ritchie at Bell Laboratory and was designed to run on a PDP-11 with UNIX Operating System. Althought at first it was intended to run under UNIX but now it has been a great interest in runnig under MS-DOS operating sustem on the IBM PC and compatibles. Its a brilliant language because of its simplicity and compactness of the code and it has wide range of application still in the twenty first century. Due to its simplicity and compactness of its code, it is usually called the first high level language available on any new computers, including the microcomputers, minicomputers and mainframes. {Also See: Getting Started with C}