0% found this document useful (0 votes)
6 views

C_Programming_Short_Notes

C is a general-purpose programming language developed by Dennis Ritchie, widely used for system programming and embedded systems. Key concepts include data types, variables, operators, conditional statements, loops, functions, arrays, pointers, and file handling. Advantages of C include fast execution, efficient memory management, and flexibility.

Uploaded by

vijaaykumar20
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)
6 views

C_Programming_Short_Notes

C is a general-purpose programming language developed by Dennis Ritchie, widely used for system programming and embedded systems. Key concepts include data types, variables, operators, conditional statements, loops, functions, arrays, pointers, and file handling. Advantages of C include fast execution, efficient memory management, and flexibility.

Uploaded by

vijaaykumar20
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/ 2

C Programming - Short Notes

C Programming - Short Notes

1. Introduction to C:

C is a general-purpose programming language developed by Dennis Ritchie. It is widely used for system

programming and embedded systems.

2. Basic Structure of a C Program:

#include <stdio.h>

int main() {

// Code

return 0;

3. Data Types in C:

- int: Integer

- float: Decimal numbers

- char: Character

- double: Double precision float

4. Variables and Constants:

Variables store data; constants are fixed values.

Example: int a = 10;

5. Operators in C:

- Arithmetic: +, -, *, /, %

- Relational: ==, !=, >, <

- Logical: &&, ||, !


C Programming - Short Notes

6. Conditional Statements:

- if, if-else, nested if

- switch statement

7. Loops in C:

- for loop

- while loop

- do-while loop

8. Functions in C:

Functions help in reusability and modular code.

Example:

int add(int a, int b) {

return a + b;

9. Arrays and Strings:

- Arrays store multiple values of the same type.

- Strings are arrays of characters ending with ''.

10. Pointers in C:

Pointers store memory addresses. Example: int *ptr;

11. File Handling in C:

Used to read/write files using functions like fopen, fclose, fprintf, fscanf, etc.

12. Advantages of C:

- Fast execution

- Efficient memory management

- Powerful and flexible

You might also like