Data Communication and Networks Notes
Unit 1: Introduction to C Language
1. History of C Language:
- Developed by Dennis Ritchie in 1972 at Bell Labs.
- Evolved from earlier languages like B and BCPL.
- Designed for system programming and developing operating systems like UNIX.
2. Features of C:
- Structured programming language.
- Rich library of built-in functions.
- Supports low-level (assembly) programming.
- Efficient and fast due to its closeness to hardware.
- Portable and platform-independent.
3. Basic Structure of a C Program:
#include <stdio.h>
int main() {
printf("Hello, World!");
return 0;
4. Data Types in C:
- int: For integer values (e.g., int a = 5;).
Page 1
Data Communication and Networks Notes
- float: For floating-point numbers (e.g., float b = 3.14;).
- char: For single characters (e.g., char c = 'A';).
- double: For double-precision floating-point numbers.
5. Variables and Constants:
- Variable: Named memory location (e.g., int x = 10;).
- Constant: Fixed value that does not change during program execution (e.g., const int pi = 3.14;).
C is a foundation for many modern programming languages and is crucial for system-level
programming.
Page 2