Hello everyone,
These set of pages are the materials used by me for the delivery of the lectures in the course of C Programming.
- Module 1
- Introduction
- Introduction to components of a Computer System
- Introduction to Algorithm and Flowchart
- Fundamentals of C Programming
- Keywords, Identifiers, Constants and Variables
- Data types in C
- Operators in C
- Basic Input and Output Operations
- Expressions and Precedence of Operators
- In-built Functions
- Introduction
- Module 2
- Control Structures
- Introduction to Control Structures
- Branching and looping structures
- If statement, If-else statement, Nested if-else, else-if Ladder
- Switch statement
- For loop, While loop
- Control Structures
- Module 3
- Functions
- Introduction to functions
- Function prototype, Function definition, Accessing a function and parameter passing.
- Recursion.
- Functions
- Module 4
- Arrays and Strings
- Introduction to Arrays
- Declaration and initialization of one dimensional and two-dimensional arrays.
- Definition and initialization of String
- String functions
- Arrays and Strings
- Module 5
- Structure and Union
- Concept of Structure and Union
- Declaration and Initialization of structure and union
- Nested structures
- Array of Structures
- Passing structure to functions
- Structure and Union
- Module 6
- Pointers
- Fundamentals of pointers
- Declaration, initialization and dereferencing of pointers
- Operations on Pointers
- Concept of dynamic memory allocation
- Pointers
\\ Comments
\\ Preprocessor Directives
\\ Globals & Constants
\\ Main Function
\\ User defined Functions
- GNU GCC (Link 1) (Link for Windows - Mingw)
- Tiny C Compiler (Link)
- Portable C Compiler (Link)
- CLang (Link)
- Digital Mars Compiler (Link)
- CodeBlocks (http://www.codeblocks.org/)
- Bloodshed Dev C++ (https://www.bloodshed.net)
- Notepad++ (https://notepad-plus-plus.org) (Use NppExec Plugin with Gcc Compiler)
- Visual Studio Comunity Edition (Link)
- Turbo C++ (Link to Website)
- -o name = Set the name of the output file eg: -o test.exe
- -E = Used to return the preprocessor output (.i extention)
- -S = Used to return assembly code (.s extension)
- -C = Used to create the object file (.o extension)
- -save-temps = To generate all the intermediate files during compilation.
- -ansi = To enable the ANSI standard
- -std=c89|c99|c9x = To change the standard
- -pedantic-errors = Strict conformance to ISO standards
- -Wall = Show errors and warnings
- List of C Programs (https://www.faceprep.in/c-programming-questions/)
- List of C Programs Link 2 (https://www.studytonight.com/c/programs/)
/*
Aim: ...
Author: ...
Class: ...
*/
#include <stdio.h>
int main ()
{
// Your code starts here
return 0;
}
/* Documentation */
/*
Aim: ...
Author: ...
Class: ...
*/
/* Libraries */
#include <stdio.h>
/* Function Declarations */
int example(int x);
/* Global Variables & Constants */
int x = 100;
#define PI 3.142
/* Main Function */
int main ()
{
// Your code starts here
return 0;
}
/* Function Definitions */
int example(int x){
}