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

C Programming Short Notes

C is a general-purpose, procedural programming language used for system programming and embedded systems. The document outlines the basic structure of a C program, data types, operators, control statements, functions, arrays, pointers, structures, unions, and file handling. Key concepts include the main function, user-defined functions, and various types of data manipulation and storage methods.

Uploaded by

nivima s
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)
1 views2 pages

C Programming Short Notes

C is a general-purpose, procedural programming language used for system programming and embedded systems. The document outlines the basic structure of a C program, data types, operators, control statements, functions, arrays, pointers, structures, unions, and file handling. Key concepts include the main function, user-defined functions, and various types of data manipulation and storage methods.

Uploaded by

nivima s
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

C Programming – Short Notes

Introduction to C
● C is a general-purpose, procedural programming language developed by Dennis Ritchie.
● Widely used for system programming and embedded systems.

Basic Structure of C Program


● Documentation section
● Link section
● Definition section
● Global declaration section
● main() function
● User-defined functions

Data Types
● Primary: int, char, float, double
● Derived: array, pointer, structure, union
● User-defined: enum, typedef

Operators
● Arithmetic: +, -, *, /, %
● Relational: <, >, <=, >=, ==, !=
● Logical: &&, ||, !
● Assignment: =, +=, -=

Control Statements
● Decision making: if, if-else, switch
● Looping: for, while, do-while
● Jumping: break, continue, goto

Functions
● Block of code performing a specific task
● Types: Library functions and User-defined functions
● Function call by value and call by reference

Arrays
● Collection of similar data elements
● Types: 1D array, 2D array

Pointers
● Stores address of another variable
● Used for dynamic memory, arrays, functions
Structures and Unions
● Structure: collection of different data types
● Union: shares memory among members

File Handling
● Used to store data permanently
● Functions: fopen(), fclose(), fprintf(), fscanf()

You might also like