Header Ads Widget

C Basic introduction

Hello friends
इस पोस्ट में  C programming language से संबंधित Basic termilogy हैं.इस पोस्ट में हम  C basic introduction,structure of C , Rules for C programming,C keywords,C operator,C Data types, variable, constant,identifiers , applications of C इन सभी topic पर discuss करेंगे

C Basic introduction


C language was developed at Bell Laboratories is the early 1972's by a system programmer named Dennis Ritchie.The C language is derived from its predecessor Basic Combined programming Language (BCPL) and the Combined Programming Language (CPL).

The C language is often described as a "middle-lever.


Rules For Creating a C Program

1. All keyword are lowercased.


2.C is case sensitive,if else is different from If ELSE.


3.keywords cannot be used for any other purpose,that is they can not be used as a variable of function name.


4.main( ) is always the first function called when a program execution beings.


5.use /*............*/ and // for comments.


Structure of c program

C program follow an structured form to be written.Each program has well defined sequence of statements.



Tokens

C program has punctuation marks,keyword and operators as the smallest individual units and are referred to as C tokens.

Six Types of Tokens are used in C language

1. Keyword

auto,break, continue,switch


2.Constants

569, -20, 35,0,123


3.Identifiers

Calcu_avg


4.String literals

"Total Amount Rs.","sum="


5.Operators

+ , - , * , % , >


6.Symbols

' , ; , : , {}, []


Keywords

Every  C word is classified as either a keywords or an identifier.keywords are predefined words. 

The words whose meaning are already explain to the c compiler are called keywords.

They are also known as resvered words.

ANSI(American National Standards Institute) announces 32 keywords in c language.

The list of all keywords


auto            double         int                   struct

break          else             long                switch

case             enum          register        typesof

char             extarn        return            union

const            float            short           unsigned

continue      for               signed           void

default         goto             sizeof           volatile

do.                 if.                  static            while



Constants

A quantity or a value that does not change is called a constant. A constant does not change during the execution of a program.

Constant can be categorised as primary and secondary constants.

1. Primary constants

Primary constants are also known as fundamental constants or basic constants.They are of three types

1.Integer constant

2.Real constant

3.Character constant


2. Secondary constant

Secondary constants are also known as derived constant as they are derived from primary constant .

Array , strings,pointers, structure,union,enumerators secondary constant.


Identifiers

Combination of basic letters forms identifiers.identifiers are smallest unit in the program that has some meaning.identifiers can be defined as the names of variable.

There are certain rules regarding identifiers names,as give below -

1.First latter must be  a alphabet not digit.


2.The underscore character   '_'   is considered a latter.


3.C is a sensitive language,both upper and lower case latter are treated differently are not interchanged.


4.For any internal identifiers name,at least the first 31 characters are significant in an any ANCI c compiler.


Data Types 

Data types in c language keep a record of the type and range the variable can store and also indicates to the machine the size that should be allocated to that variable.

C language is rich in its data types.

C support three classes of data types



1.Primary

int ,char,float,double




2.Derived data types

arrays, Pointer


3.User-defined data types

structure ,union


Variables

Variables are the name of memory locations where we store our data.

A variables is an entity that has a value and is known to the program by a name.

A variable is an identifier or a name which is used to refer a value and this value varies or changes during the program execution.

A variable is written with a combination of letters, numbers and special character ' _ '(underscor)  with the first letter being an alphabet.


Operators



Operators is a symbol that tells the computer to perform certain mathematical or logical manipulations.

Operators are used in programs to manipulate data and variable.

C language uses may operators as listed below

1.Arithmetic operators

2.Relational operators

3.Logical operators

4. Conditional operators

5.Bitwise operators

6.increment and decrement operators


Applications Of C 

Features exhibited by the C language make it an obvious choice in the development of various applications.Developing comilers,interpreters, operating system, graphic and general utilities that could be categorised as a part of system programming can be easily achieved with the help of c programming language.

Databases ,word processor and compliers for various other languages can be developed using the power and flexibility of the C language.






Thanks for visit !


basic Computer in hindi

What is input device//keyboard//mouse//joystick//scanner//tracball//microphone in hindi

50 one liner computer most important question in hindi

what is software||what is Hardware in hindi

Computer one liner Gk question in hindi

Computer one liner question for DCA,PGDCA and all competitive exam

Computer Fundamental quiz in hindi

Computer Gk Quiz in hindi

Artificial intelligence क्या हैं


Post a Comment

0 Comments