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

C Programming Quick Revision

This document provides a quick revision of C programming, covering its basics, data types, operators, control statements, functions, arrays, strings, pointers, structures, unions, file handling, and preprocessors. It outlines fundamental concepts such as the basic structure of a C program, various data types, and essential functions and operations. The document serves as a concise reference for key elements of the C programming language.

Uploaded by

mrrobber50
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)
4 views2 pages

C Programming Quick Revision

This document provides a quick revision of C programming, covering its basics, data types, operators, control statements, functions, arrays, strings, pointers, structures, unions, file handling, and preprocessors. It outlines fundamental concepts such as the basic structure of a C program, various data types, and essential functions and operations. The document serves as a concise reference for key elements of the C programming language.

Uploaded by

mrrobber50
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

Quick Revision of C Programming

1. Basics of C

C is a procedural, compiled language developed by Dennis Ritchie.

Basic structure:

#include <stdio.h>

int main() {

printf("Hello, World!");

return 0;

2. Data Types

Basic: int, float, char, double

Derived: array, pointer, structure, union

Qualifiers: signed, unsigned, long, short

3. Operators

Arithmetic: +, -, *, /, %

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

Logical: &&, ||, !

Bitwise: &, |, ^, ~, <<, >>

Assignment: =, +=, -=, etc.

4. Control Statements

Conditional: if, else, switch

Loops: for, while, do-while

Jump: break, continue, goto, return

5. Functions

Declaration: return_type function_name(parameters);


Call by Value vs Reference

Recursion: function calls itself

6. Arrays and Strings

Array: int a[10];

String: char name[20];

Functions: strcpy, strlen, strcmp

7. Pointers

Declaration: int *ptr;

Pointer Arithmetic: ptr++, ptr--

Pointer to Array, Function, Structure

8. Structures and Unions

Structure: struct student { int id; char name[20]; };

Union shares memory among members.

9. File Handling

Functions: fopen, fclose, fprintf, fscanf, fgets, fputs

Modes: r, w, a, rb, wb

10. Preprocessors

Directives: #include, #define, #ifdef, #ifndef

You might also like