BCA C Language notes download

 


📘 C Language – Study Notes (Download Version)

1. Introduction to C

  • C is a general-purpose, procedural programming language
  • Developed by Dennis Ritchie (1972)
  • Combines low-level + high-level features
  • Used in OS, embedded systems, compilers

2. History of C

  • ALGOL → BCPL → B → C
  • C gained popularity due to:
    • UNIX development
    • Efficiency and speed
    • Portability

3. Structure of a C Program

#include <stdio.h>

int main() {
printf("Hello World");
return 0;
}

Components:

  • #include → Library inclusion
  • main() → Entry point
  • Statements → Instructions
  • return 0 → Ends program

4. Functions (Building Blocks)

  • A function is a block of code performing a task
  • Helps in:
    • Modularity
    • Reusability
    • Easy debugging

Example:

int add(int a, int b) {
return a + b;
}

5. Character Set

Includes:

  • Letters (A–Z, a–z)
  • Digits (0–9)
  • Special symbols (+, -, *, etc.)
  • Whitespaces

6. C Tokens

Smallest units in a program

Example:

int a = 5;

Tokens: int, a, =, 5, ;

Types:

  • Keywords
  • Identifiers
  • Constants
  • Variables
  • Operators

7. Keywords

  • Reserved words with fixed meaning
    Examples: int, float, if, else, return

8. Identifiers

  • Names of variables/functions

Rules:

  • Start with letter or _
  • Cannot be a keyword
  • Case-sensitive

9. Variables

  • Named memory locations

Example:

int age = 20;

10. Constants

  • Fixed values

Types:

  • Integer: 10
  • Float: 3.14
  • Character: 'A'
  • String: "Hello"

11. Data Types

Basic:

  • int
  • float
  • char
  • double

Derived:

  • Arrays
  • Pointers
  • Structures

Void:

  • No value

12. Comments

Single-line:

// comment

Multi-line:

/* comment */

Comments

Popular posts from this blog

BCA 3rd Sem Notes download

BA downlaoad pyqs

Class 10th pyqs download