How will learn of c language?

You can not be great at the start, but you  have to start to be great. So making a beginning is important . This chapter will help you wet your feet, before beginning a more arduous C journey......

well begun is half done...

1.what  is C?

2. Getting started with C?

3.All alphabets , Digits,and special symbols?

4. Rules for constructing integer constant?

5. Type of constant?

6 .Type of c variable?

7.Rules for constructing real constant?

8. Rules for constructing character constant?

9.Rules for constructing variable name?

10. C keywords?

11 .what is main()?

12 .what is printf () ?

13. The first C program?


1.what  is C language ?   ---C is a programming language developed at AT& T's Bell laboratories of USA in 1972 by dennis Ritchie.  C become popular because it is simple and easy to use. An opinion that is often heard today is "C has been already superseded by languages like C++,C# and java ,so why bother to learn C today" there are several reasons for this . there are is follows:

(a). you must have seen several professional 3D computer games where the user navigates some object like a say a spaceship and fires  bullets at invaders . the essence of all such games is speed. 

(b).Common consumer devices like microwave  ovens, washing machine and digital cameras are getting smarter by the day.

(c). C is language of choice while building such operating system and programs.

(d). C++ ,C# or java make use of a principle called object oriented programming (OOP) to organize programs which offers many advantage. so makes more sense to first learn C  and migrate to C++,C# or java. though the two step learning process may take more time but at the end of it you will definitely find it worth the trouble.

2. Getting started with C?

 There is close analogy between learning  English language and learning C language ..

step  in learning English language:

  Alphabets→Words➡ Sentences👈➡➡ Paragraph
 
 Steps and learning C language
 
 Alphabets Digits]     ⟶ 👉 Constant variable ] 👉   ➡➡      Instructions  ➡➡ program
special symbols   ]               keywords                ]
 
 
 3.All alphabets , Digits,and special symbols?
 
 alphabets -A,B,...............Y , Z
                    a,b,c..............y , z
digits     --0,1.2,3,4,5,6,7,8,9
special symbols     ~ ' ! @ # % ^ & * () _ - + = | \ {} : ; ' < >  , . ? / $ 
 
 4. Rules for constructing integer constant?
(a) An any integer constant must have a least one digit.
(b). No commas or blanks are allowed within an integer constant.
(c). It must not have a decimal point .
(d). It can be any zero positive or negative .if no sign precedes an integer constant , it is assumed to be positive.
(e). The allowable range for integer constants is -2147483648 to +2147483647.
ex: 426        +782        -8000        -7605   
 
5. Type of constant?  
 (a)  A real constant must have at least one digit.
(b)  It must have a decimal point 
(c)   No commas or blanks are  allowed within a real constant.
(d) It can be either positive or negative default sign is positive.
 
ex     +325.340       426.00           -3.276      -64. 3443        4.0
 
real constant expressed in exponential form    
 
ex   +4.36e^-4        4.23e^8          -0.2E+3        -3.23e^-3
 
  6 .what is Type of c variable?
 A type of variable of  can hold only the same  type of constant .
for example , an integer variable  
 7. Rules for constructing real constant?

9.Rules for constructing variable name?

(a). A variable name is any combination of 1 to 31 alphabets , digit or underscores. some compilers allow variable names whose length could be up to 247 characters . Do not create unnecessarily long variable names as it adds to your typing effort.

(b). the first character in the variable name must be an alphabet or underscores(_).

ex.  si_int pop_e_89                    basic_salary        int si,m_hra;

        float bassal;                    char code;

10. C keywords?

auto            double            int              struct

break          else                long             switch

case             enum            resister         typedef

char            exterm         return            union

const            float              short             unsigned

continue      for                signed            void

default         goto               sizeof            volatile

do                 if                    static             while

11 .what is main()? v

 
 
 
 

 

Comments

Popular posts from this blog

class with array in c++ (memory allocatin & using array in classes)

constructor with default arguments

constructor overloading in c++ programming