Wednesday, July 15, 2015

Keywords in C @ concept of programming

reserved word in c programming,how many keyword in c

1. Words which are reserved by compiler are known as Keywords.

2. We cannot use these reserved words as a variable name because if we will do this ,we tried to change the meaning of that keyword which is not allowed by the compiler.

3. So, user cannot change the meaning of any keyword.

4. As all we know c programming is a case sensitive programming language so, every keyword must be written in lowercase.

5. In c programming mainly 32 keywords are available. List of all keywords in c language is given below :-

Keywords In C Programming
autodoubleintstruct
breakelselongswitch
caseenumregistertupedef
charexternreturnunion
constfloatshortunsigned
continueforsignedvoid
defaultgotosizeofvolatile
doifstaticwhile




















6.Apart from the above mentioned keywords some other compiler vendors like micosoft etc. provide their own keywords. Some of them extended keywords are given below-

Extended keywords In C Programming
asmnearfarpascal intrrupthugecdecl








RELATED TOPIC FROM C PROGRAMMING LANGUAGES-




1.What is c programming language?
2.Why should we learn c programming before migrating to high level languages like c++ or java?
3.Character set in C programming language.
4.Constant in C programming language.

Monday, April 27, 2015

Constant in C Programming Language and Rules for Constructing Constant


variable and constant in c programming,primary constant,secondary constant,integer,real,float,character,array,structure,pointer,union,enum and rules for constructing constant


Constant - An entity that does not change known as constant.

                            In c programming constant can be divided into 2 major categories :

                            1. Primary Constant :-

                                Here primary constant is further categorized into 3 types.
                                
                                1.Integer
                                2.Real
                                3.Character




                            2. Secondary Constant :-

                                Secondary constant is also further divided into below categories.
                                
                                1. Array
                                2. Pointer
                                3. Structure
                                4. Union 
                                5. Enum




In C programming,there are some rules for constructing constant:

1. Rules for constructing integer constant:

Rules for constructing integer constant are as follows:

1. An integer constant must contain at least one digit.
2. An integer must not have a decimal point
3. An integer can be either positive or negative.
4. If an integer does not precedes any sign it is assumed to be positive.
5. Commas and blanks are not allowed.
6. The range of an integer constant depends upon the type of compiler.
             For Example- 
                                   For gcc and visual studio compiler -2147483648 to +2147483647
                                  For turbo c or turbo c++ compiler is -32768 to 32767.






2. Rules for constructing real constant:-





Also known as floating point constant .
 
             These constant have 2 forms :-
A) Fractional form
B) Exponential form      

A) Rules for constructing fractional form real constant:-

1. Constant must have at least one digit.
2. Constant must have a decimal point.
3. Can be either positive or negative .
                4. If no sign precedes it is assumed to be positive.
5. Commas and blanks are not allowed.
For ex. +325.24 

B) Rules for constructing exponential form real constant:-

Exponential real constant represented in 2 parts.
1. First part before "e" known as mantissa.
2. Part after "e" known as exponent.
For ex. 0.22e4

a) Both the parts mantissa and exponent should be separated by a alphabet "e" or "E".
b) Mantissa part may have a positive or negative sign default will be positive.
c) Exponent part must have at least one digit which must be positive or negative integer,        default will be positive.
d) Range of exponential form is -3.4e38 to 3.4e38

3. Rules for constructing character constant:-

a) a character constant contains a single alphabet,a single digit or a single special symbol enclosed within single inverted commas.
b) both inverted commas should point to left.

Wednesday, April 15, 2015

Character Set in C Programming Language



character set in c consist of alphabets, digits and special symbols

Character sets which are allowed in C programming language are as follows:-

1. Alphabets     which consist both lower and upper case alphabets. 

                          1. Upper case alphabets:- A,B,C,D…………….,X,Y,Z. 
                          2. Lower case alphabets:- a,b,c,d,.…………….,x,y,z. 

2. Digits            which consists numbers from 0 to 9.

                          1. Digits/numbers:- 0,1,2,3,4,5,6,7,8,9

3. Special character/symbols   which includes curly braces, square bracket , addition, subtraction, 
                                                  multiplication, division, equals signs and many more. 






                          1. Special character/symbol:- ~ ` ! @ # % ^ & * ( ) _ - + = | \ { } [ ] : ;                                                                                                   “ ‘ < > , . ? / $

RELATED TOPIC FROM C PROGRAMMING LANGUAGES-

What is c programming language?
Why should we learn c programming language before migrating to high level languages like c++ or java?
Constant in C programming language.

Tuesday, April 14, 2015

What is c programming language

c is a programming language developed by dennis ritchie at AT & T's Bell laboratories also known as middle level language mixture of low and high level language
C PROGRAMMING LANGUAGE







C is a programming language. It was designed and developed by DENNIS RITCHIE in 1972. It was developed at AT & T’s Bell laboratories of USA. DENNIS RITCHIE was a system programmer at AT & T’s Bell laboratories.

C programming language was the successor of B programming language. B programming language was earlier developed by KEN THOMPSON at Bell laboratories. But B programming language was inadequate to write big programs. For example- O.S. (Operating System)

C programming language is also known as middle level language. It means it support both high level language and low level language features. 

It supports high level language features like data types, data structures which are needed by a normal programmer. 

It supports low level language features like accessing the computer hardware through special designed declarations and functions.

RELATED TOPIC FROM C PROGRAMMING LANGUAGES-

Why should we learn c programming language before migrating to high level languages like c++ or java?
Character set in C programming language.
Constant in C programming language.

Thursday, March 26, 2015

Why should we learn c programming language before migrating to c++, c# or java programming language?

reason for learning c before c++,java or c#.why c is beginner language

To get latest update comment your e-mail ID in comment box.

1. When you will go to learn c#, c++ or java programming languages directly you will not able to understand the concept of these programming languages. Because when you will learn these programming languages you would be learn topics like classes, objects , inheritance , poly-morphism etc. And learning these complicated topics without knowing about basics of programming language is something like putting the cart before the horse. So,everyone should learn basics of c programming language before migrating to c#, c++ or java programming languages.

2. Many tools and frameworks based on c++ or java programming languages still required to use core c language programming elements that is another best reason.

3. Operating systems likes windows, UNIX, Linux are still written in c programming language. Because when it comes to performance means speed of execution nothing beats c programming language.

4. Today's common devices like mobile phones,washing machines etc. are getting smarter and this comes from a microprocessor,an operating system and a program embedded in these devices and their is no wonder that such programs are written in c programming language.