C is a general-purpose, procedural programming language that was developed by Dennis Ritchie in 1972 at Bell Labs. It is widely used for system programming, operating systems, embedded systems, and application development. C is known for its efficiency and control over hardware.
A simple C program follows this structure:
#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
#include <stdio.h>
: Preprocessor directive to include the standard I/O library.int main()
: The main function where the program execution begins.printf()
: A function to print output to the screen.return 0;
: Indicates that the program executed successfully.#include
, #define
, etc.if
, switch
, loops (for
, while
, do-while
), and control statements (break
, continue
).These four chapters lay the foundation for understanding and writing basic C programs. Let me know if you'd like more detailed explanations or examples for any of these topics!