0% found this document useful (0 votes)
45 views2 pages

Cintro

C is a general-purpose, procedural programming language developed in the 1970s, commonly used in systems programming and embedded systems. The document outlines the basic structure of a C program, key concepts such as variables, control flow, loops, functions, pointers, and arrays, along with examples. C is emphasized as a foundational language due to its performance and flexibility in software development.

Uploaded by

emnamadeni58
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)
45 views2 pages

Cintro

C is a general-purpose, procedural programming language developed in the 1970s, commonly used in systems programming and embedded systems. The document outlines the basic structure of a C program, key concepts such as variables, control flow, loops, functions, pointers, and arrays, along with examples. C is emphasized as a foundational language due to its performance and flexibility in software development.

Uploaded by

emnamadeni58
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

Introduction to C Programming

Emna
July 26, 2025

1 What is C?
C is a general-purpose, procedural programming language developed in the early 1970s. It
provides low-level access to memory and is often used in systems programming, embedded
systems, and developing operating systems.

2 Basic Structure of a C Program


# include < stdio .h >

int main () {
printf ( " Hello , ␣ World !\ n " ) ;
return 0;
}

3 Key Concepts
• Variables and Data Types

• Control Flow (if, else, switch)

• Loops (for, while, do-while)

• Functions

• Pointers

• Arrays and Strings

1
4 Example: Adding Two Numbers
# include < stdio .h >

int add ( int a , int b ) {


return a + b ;
}

int main () {
int result = add (5 , 3) ;
printf ( " Sum : ␣ % d \ n " , result ) ;
return 0;
}

5 Pointers Example
# include < stdio .h >

int main () {
int x = 10;
int * p = & x ;
printf ( " Value ␣ of ␣ x : ␣ % d \ n " , * p ) ;
return 0;
}

6 Conclusion
C remains a foundational language in computer science and engineering. Its performance,
portability, and flexibility make it ideal for learning programming and building system-level
software.

You might also like