0% found this document useful (0 votes)
12 views10 pages

L-01 C Programming 23122024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views10 pages

L-01 C Programming 23122024

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

C

Programming
Language
By : Prof. Rahul Jain
Introduction to Programming and C Language

● Why Programming
● History of C Language
● Your First Program
Why Learn Programming?

● Automates repetitive tasks.


● Solves complex problems efficiently.
● Forms the backbone of software development
and technology.
● Enables creativity and innovation in various
fields (AI, web development, games, etc.).
● High-demand skill in the modern job market.
A Brief History of C

● Developed by Dennis Ritchie in 1972 at Bell Labs.


● Evolved from earlier languages: B and BCPL.
● Initially created for system programming (UNIX
operating system).
● Widely used for: Operating systems. Embedded systems.
Application development.
● Influenced many modern languages like C++, Java, and
Python.
Why Choose C?
Features of C Language

● Simple and efficient.


● Structured programming.
● Low-level access to memory.
● Rich library of built-in functions.
● Portable and widely supported.
● Foundation for modern languages.
Your First Program – Hello World!

#include <stdio.h>
int main() {
printf("Hello, World!\n");
return 0;
}
Your First Program – Explanation

#include <stdio.h> #include <stdio.h>: Includes


standard input/output library.
int main() { int main(): Entry point of the
program.
printf("Hello, World!\n");
printf("Hello, World!\n");: Prints
return 0; "Hello, World!" to the console.

return 0;: Indicates successful


}
execution.
Steps to Run the Program

Compiling and Running the Program


1. Write the program in a text editor or IDE.
2. Save the file with a .c extension (e.g., hello.c).
3. Compile using a C compiler like GCC:

gcc hello.c -o hello

4. Run the compiled program:

./hello
Tips for Beginners

● Practice writing and running simple programs.


● Understand error messages during compilation.
● Explore the basic syntax and concepts (variables,
loops, etc.).
● Use an IDE for better debugging and visualization
(e.g., Code::Blocks, Dev-C++).
Summary

● Programming is essential for solving real-world


problems.
● C language is foundational, versatile, and efficient.
● "Hello, World!" is the traditional starting point for
learning any language.

You might also like