Introduction to C Language Programming
C is a general-purpose, procedural programming language developed by Dennis Ritchie in the early
1970s at Bell Labs.
It is widely used for system programming, developing operating systems, and embedded systems
due to its efficiency and flexibility.
Features of C Language:
- Simple and efficient
- Fast execution
- Portable and machine-independent
- Rich set of built-in functions
- Supports structured programming
- Low-level memory manipulation using pointers
Basic Structure of a C Program:
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
Explanation:
- #include <stdio.h>: Includes the standard input-output library.
- int main(): Main function, the entry point of the program.
- printf(): Prints text to the console.
- return 0;: Ends the program execution.
Data Types in C:
- int - Integer type (e.g., 10, -5)
- float - Floating-point type (e.g., 3.14, -2.5)
- char - Character type (e.g., 'A', 'b')
C is a general-purpose, procedural programming language developed by Dennis Ritchie in the early
1970s at Bell Labs.
It is widely used for system programming, developing operating systems, and embedded systems
due to its efficiency and flexibility.
Features of C Language:
- Simple and efficient
- Fast execution
- Portable and machine-independent
- Rich set of built-in functions
- Supports structured programming
- Low-level memory manipulation using pointers
Basic Structure of a C Program:
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
Explanation:
- #include <stdio.h>: Includes the standard input-output library.
- int main(): Main function, the entry point of the program.
- printf(): Prints text to the console.
- return 0;: Ends the program execution.
Data Types in C:
- int - Integer type (e.g., 10, -5)
- float - Floating-point type (e.g., 3.14, -2.5)
- char - Character type (e.g., 'A', 'b')