C Tutorial

C Programming Tutorial
C Programming Tutorial

Welcome to the C Knowledge Base and Tutorial

Part 1 – Basic knowledge

Part 2 – Decision Control in C

Part 3 – Loop structure

  • Loops
  • The while Loop
  • The for Loop
  • The Odd Loop
  • The break Statement
  • The continue Statement
  • The do-while Loop
  • Summary of loop structure
  • Quiz of loop structure – Test your Skill
  • Examples

Part 4 – The Case Control Structure

  • Decisions Using switch
  • switch and if-else
  • The Goto Keyword
  • Summary of the case control structure
  • Quiz of case control structure
  • Examples

Part 5 – Functions & Pointers

Introduction of function

Why use function

Passing Values between Functions

Scope Rule of Functions

Calling Convention

Advanced Features of Functions

Function Declaration and Prototypes

Call by Value and Call by Reference

Pointers

Recursion

Recursion and Stack

Adding Functions to the Library

Summary of Function and Pointer

Quiz of function and pointer

Part 6 – Arrays

What are Arrays

Array Initialization

Passing Array Elements to a Function

Pointers and Arrays

Passing an Entire Array to a Function

Two Dimensional Arrays

Pointers and 2-Dimensional Arrays

Pointer to an Array

Passing 2-D array to a Function

Array of Pointers

Limitation of Array of Pointers to Strings

Summary of Array

Quiz of Array

Part 7 – Structures

Introduction of Structure

Array of Structures

Uses of Structures

Summary of Structure

Quiz of Structure

part 8 – Console Input/Output

Types of I/O

Formatted Console I/O Functions

sprintf( ) and sscanf( ) Functions

Unformatted Console I/O Functions

Summary of console input output

Quiz of console input output

part 9 – File Input/Output

  • Data Organization
  • File Operations
    • Opening a File
    • Reading from a File
    • Trouble in Opening a File
    • Closing the File
  • Counting Characters, Tabs, Spaces
  • A File-copy Program
    • Writing to a File
  • File Opening Modes
  • String (line) I/O in Files
  • Record I/O in Files
  • Text Files and Binary Files
  • Database Management
  • Low Level Disk I/O
    • A Low Level File-copy Program
  • I/O Under Windows
  • Summary of  File Input/Output
  • Quiz of File Input/Output

 

switch case statement in C Programming

C switch caseThe switch case statement is used when we have multiple options and we need to perform a different task for

Read More »


continue statement

C Continue StatementThe continue statement is used inside loops. When a continue statement is encountered inside a loop, control jumps to the

Read More »


do while loop in C programming

C do while loopA do while loop is similar to while loop with one exception that it executes the statements inside the body

Read More »


C – while loop in C programming

C while loopA loop is used for executing a block of statements repeatedly until a given condition returns false. In the previous

Read More »


C – for loop in C programming

C for loopA loop is used for executing a block of statements repeatedly until a given condition returns false. C For loop

Read More »


C – If..else, Nested If..else and else..if Statement

C If else flow diagramC If else statement Syntax of if else statement: If condition returns true then the statements inside the body of

Read More »


If statement in C programming

C-if-statementWhen we need to execute a block of statements only when a given condition is true then we use if

Read More »


Operator precedence and Associativity in C programming language

Operator Precedence in C Operator precedence determines which operator is evaluated first when an expression has more than one operators.

Read More »


C Keywords – Reserved Words

In C, we have 32 keywords, which have their predefined meaning and cannot be used as a variable name. These

Read More »


C Program to find largest element of an Array

#include <stdio.h> largest_element(int arr[], int num) { int i, max_element; max_element = arr[0]; for (i = 1; i < num;

Read More »


C Program to arrange numbers in ascending order

  #include <stdio.h> void sort_numbers_ascending(int number[], int count) { int temp, i, j, k; for (j = 0; j <

Read More »


C program to find the length of a String without using function strlen()

#include <stdio.h> int main() { char str[100],i; printf("Enter a string: \n"); scanf("%s",str); for(i=0; str[i]!='\0'; ++i); printf("\nLength of input string: %d",i);

Read More »


C Program to calculate Area of Equilatral triangle

#include<stdio.h> #include<math.h> int main() { int triangle_side; float triangle_area, temp_variable; printf("\nEnter the Side of the triangle:"); scanf("%d",&triangle_side); temp_variable = sqrt(3)

Read More »


C Program to calculate Area and Circumference of Circle

#include <stdio.h> int main() { int circle_radius; float PI_VALUE=3.14, circle_area, circle_circumf; printf("\nEnter radius of circle: "); scanf("%d",&circle_radius); circle_area = PI_VALUE

Read More »


Quicksort program in C

  #include<stdio.h> void quicksort(int number[25],int first,int last){ int i, j, pivot, temp; if(first<last){ pivot=first; i=first; j=last; while(i<j){ while(number[i]<=number[pivot]&&i<last) i++; while(number[j]>number[pivot])

Read More »


« Newer EntriesOlder Entries »
  • sultan69
  • panen99
  • sultan69
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d