C Prog Language

Get Started. It's Free
or sign up with your email address
Rocket clouds
C Prog Language by Mind Map: C Prog Language

1. Datatypes

1.1. Built-In Type

1.1.1. Integer

1.1.1.1. Signed

1.1.1.1.1. int

1.1.1.1.2. short int

1.1.1.1.3. long int

1.1.1.2. Unsigned

1.1.1.2.1. long int

1.1.1.2.2. short int

1.1.1.2.3. int

1.1.2. Float

1.1.2.1. long double

1.1.2.1.1. 80bits

1.1.2.2. float

1.1.2.2.1. 32 bits

1.1.3. Character

1.1.3.1. Signed char

1.1.3.1.1. 8bits

1.1.3.2. Unsigned char

1.1.3.2.1. 8bits

1.1.3.3. Char

1.1.4. Double

1.1.4.1. double

1.1.4.1.1. 64bits

1.2. Derived Type

1.2.1. Array

1.2.2. Funtions

1.2.3. Pointer

1.2.4. Reference

1.3. User Defined Types

1.3.1. Structure

1.3.2. Union

1.3.3. Enumeration

2. Design on Paper

2.1. Ms. Divya Khanure

3. mode

3.1. r - read only

3.2. w - write only

3.3. a - appending data

4. Strings

4.1. Concatenation

4.1.1. strcat(str1,str2); output is str1str2

4.2. Comparison

4.2.1. strcmp(str,str2); ASCII str1 - ASCII str2, +ve if str1<str2, -ve if str1 > str2

4.3. Copying

4.3.1. strcpy(str1,str2); outputs str1="str2";

4.4. Length

4.4.1. n=strlen(str);

4.5. Substr and many more string functions are available...

4.6. Built in function in ctype.h

4.6.1. isalpha(x)

4.6.2. isdigit(x)

4.6.3. isalphanum(x)

4.6.4. ispunct(x)

4.6.5. islower(x)

5. C- Tokens

5.1. Special Symbols (Delimeters)

5.1.1. ;,!?#$

5.2. Constants & Variables

5.2.1. Numeric Constants

5.2.1.1. int

5.2.1.1.1. %d

5.2.1.2. real

5.2.1.2.1. float

5.2.1.2.2. exponential

5.2.2. Character Constants

5.2.2.1. Single

5.2.2.1.1. %c

5.2.2.2. String

5.2.2.2.1. %s

5.2.2.2.2. Backslash

5.3. Keywords

5.3.1. Basic Building Blocks

5.3.1.1. int

5.3.1.2. if

5.3.1.3. case

5.3.1.4. while

5.3.1.5. struct

5.3.1.6. auto

5.3.1.7. break

5.3.1.8. case

5.3.1.9. do

5.3.1.10. for

5.3.1.11. else

5.3.1.12. continue

5.3.1.13. goto

5.3.1.14. return

5.3.1.15. switch

5.3.1.16. union

5.3.1.17. void

5.3.1.18. float

5.3.1.19. char

5.3.1.20. long

5.3.1.21. int

5.3.1.22. short

5.3.1.23. double

5.3.1.24. sizeof

5.3.1.25. typedef

5.3.1.26. register

5.3.1.27. static

5.3.1.28. const

5.3.1.29. extern

5.3.1.30. define

5.4. Identifiers

5.4.1. Ex: amount, sum etc

5.5. Strings

5.5.1. Ex" :SDMCET", "123"

5.6. Operators

5.6.1. Arithmetic

5.6.1.1. +

5.6.1.2. -

5.6.1.3. /

5.6.1.4. %

5.6.1.5. *

5.6.2. Logical

5.6.2.1. ||

5.6.2.2. &&

5.6.2.3. !

5.6.3. Assignment

5.6.3.1. +=

5.6.3.2. -=

5.6.3.3. *=

5.6.3.4. /=

5.6.3.5. %=

5.6.4. Conditional

5.6.4.1. exp1 ? exp2 : exp3;

5.6.5. Special

5.6.5.1. sizeof

5.6.5.2. , [comma]

5.6.6. Increment / Decrement

5.6.6.1. post

5.6.6.1.1. ++

5.6.6.2. pre

5.6.6.2.1. --

5.6.7. Bitwise

5.6.7.1. &

5.6.7.2. /

5.6.7.3. <<

5.6.7.4. >>

5.6.7.5. ~

5.6.8. Relational

5.6.8.1. <

5.6.8.2. <=

5.6.8.3. >

5.6.8.4. >=

5.6.8.5. ==

5.6.8.6. !=

6. Expressions

6.1. Arithmetic

6.1.1. precedence

6.1.1.1. high

6.1.1.1.1. *

6.1.1.1.2. /

6.1.1.1.3. %

6.1.1.2. low

6.1.1.2.1. +

6.1.1.2.2. -

6.1.2. example

6.1.2.1. a*b-c ->a*b-c

6.1.2.2. 3*x*x-x ->3x^2-x

6.2. Conversions

6.2.1. automatic type

6.2.1.1. follows the hierarchy of size of the operands

6.2.2. casting a value

6.2.2.1. (type name)exp;

6.3. Mathematical Functions

6.3.1. #include<math.h> cc filename -lm

6.3.1.1. example

6.3.1.1.1. exp(x)

6.3.1.1.2. fabs(x)

6.3.1.1.3. sqrt(x)

7. Input/Output

7.1. Formatted

7.1.1. Input

7.1.1.1. scanf("control string", &arg1,&arg2..);

7.1.2. Output

7.1.2.1. printf("control string", arg1,arg2..);

7.2. Unformatted

7.2.1. putchar

7.2.1.1. putchar(variable_name);

7.2.2. getchar

8. Control Statements

8.1. if

8.1.1. simple if

8.1.1.1. if(test exp){ body;} statement -x;

8.1.2. if else

8.1.2.1. if(test exp){ true-block}; else {false-block}; statement-x

8.1.3. nested if else

8.1.3.1. if(test exp1) { if(test exp2){ statement1} else {statement2;} else {statement 3}; statement-x;

8.1.4. else if ladder

8.1.4.1. if(condition1) statement1; else if(condition2) statement2; else if.........else if(condition n) statement n; else default statement

8.2. swicth

8.2.1. switch(exp){ case value1:block1; break; case value2:block2; break; ..........default:block; break; } statement-x;

8.3. conditional

8.3.1. conditional exp? exp1:true exp2:false

8.4. goto

9. Loops

9.1. continue (skip)

9.2. for

9.2.1. for(initialize ; test exp ; increment) { body; }

9.3. while

9.3.1. while(test exp) { body; }

9.4. do.. while

9.4.1. do { body ; } while(test exp);

9.5. break (jump)

10. Arrays

10.1. Dimensions

10.1.1. One

10.1.1.1. Declaration

10.1.1.1.1. type var_name[size];

10.1.1.2. Initialization

10.1.1.2.1. type name[size]={list of values};

10.1.2. Two

10.1.2.1. Declaration

10.1.2.1.1. type name[row_size] [col_size];

10.1.2.2. Initialization

10.1.2.2.1. type name[row_size] [col_size]={{row list},{col list}};

10.1.3. Multi

10.1.3.1. Declaration

10.1.3.1.1. type name[s1][s2][s3]....[sn];

10.1.3.2. Initialization

10.1.3.2.1. type name[s1][s2][s3]...[s3]={{list s1},{list s2}, {list s3}, {list s4}.....{list sn}};

10.2. Character Array (String)

10.2.1. Declaring / Initialising

10.2.1.1. char name[size];

10.2.2. Reading

10.2.2.1. scanf("%s",name);

10.2.3. Writing

10.2.3.1. printf("%s",name);

11. Functions

11.1. declaration

11.1.1. type name (type var1.......)

11.2. calling

11.2.1. main() { name(var1........); }

11.2.2. Call By Value - actual value of parameters

11.2.3. Call By Reference - pointers

11.3. types

11.3.1. with no arguments no return type

11.3.2. with no arguments one return type

11.3.3. with arguments no return type

11.3.4. with arguments multiple return type

11.4. definition

11.4.1. syntax

11.4.1.1. type name(type var1........) { local declaration; executable part; return(var); }

11.5. Recursion

12. Pointers

12.1. declaring

12.1.1. datatype *pt_name

12.2. initialize

12.2.1. p=&quantity

12.3. accessing

12.3.1. int quantity *p,n quantity=179; p=&quantity; n=*p

13. Files

13.1. Open

13.1.1. FILE *fp; fp=fopen("filename","mode");

13.2. Close

13.2.1. fclose(file_pointer);

13.3. Input

13.3.1. putc(c, fp1);

13.3.2. c=getc(fp2);

13.4. Access

13.4.1. position

13.4.1.1. n=ftell(fp);

13.4.2. reset position

13.4.2.1. rewind(fp);

13.4.3. moving

13.4.3.1. fseek(fp,offset,position)

13.5. Output

13.5.1. fprintf(fp,"control string",list);

13.5.2. fscanf(fp,"control string",list);

14. Structures / Unions

14.1. define a structure

14.1.1. struct name; { data type member1; datatype member2;..........};

14.2. initialization members

14.2.1. main(){ struct name{ datatype mem1; datatype mem2;.....}; struct name mem1={constant.....}; struct name mem2={constant......}; }

14.2.2. struct name{ datatype mem1; datatype mem2;.....};mem1={constants.......}; main(){ struct name mem2={constants.....};...............}

15. History of C

15.1. ALGOL

15.2. BCPL

15.3. B

15.4. Traditional C

15.5. ANSI C

15.6. ANSI/ ISO C

15.7. Dennis Retchie

16. Few Other Links

16.1. Companies using C Programming Language

16.1.1. https://docs.google.com/spreadsheet/ccc?key=0AvPic5Th8MOmdFdHc05mRHQwQmFNazk0T0N1RDRmcUE&usp=sharing#gid=0

16.2. NPTEL Videos

16.2.1. http://nptel.ac.in/courses/106104074/

16.2.2. http://ekalavya.it.iitb.ac.in/eVideos/CS101/content/preview.html

16.3. NPTEL Slides

16.4. Virtal Lab

16.5. Spoken Tutorials