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

 

C Program for bubble sorting

#include<stdio.h> int main(){ int count, temp, i, j, number[30]; printf("How many numbers are u going to enter?: "); scanf("%d",&count); printf("Enter

Read More »


Insertion Sort Program in C

#include<stdio.h> int main(){ int i, j, count, temp, number[25]; printf("How many numbers u are going to enter?: "); scanf("%d",&count); printf("Enter

Read More »


Selection Sort Program in C

#include<stdio.h> int main(){ int i, j, count, temp, number[25]; printf("How many numbers u are going to enter?: "); scanf("%d",&count); printf("Enter

Read More »


C Program to check whether the given integer is positive or negative

#include <stdio.h> void main() { int num; printf("Enter a number: \n"); scanf("%d", &num); if (num > 0) printf("%d is a

Read More »


C Program to Find Quotient and Remainder

  #include <stdio.h> int main(){ int num1, num2, quot, rem; printf("Enter dividend: "); scanf("%d", &num1); printf("Enter divisor: "); scanf("%d", &num2);

Read More »


C Program to find the Sum of First n Natural numbers

#include <stdio.h> int main() { int n, count, sum = 0; printf("Enter the value of n(positive integer): "); scanf("%d",&n); for(count=1;

Read More »


C Program to check if a number is palindrome or not

  #include <stdio.h> int main() { int num, reverse_num=0, remainder,temp; printf("Enter an integer: "); scanf("%d", &num); temp=num; while(temp!=0) { remainder=temp%10;

Read More »


C Program to check whether a Character is an Alphabet or not

  #include <stdio.h> int main() { char ch; printf("Enter any character: "); scanf("%c",&ch); if( (ch>='a' && ch<='z') || (ch>='A' &&

Read More »


C Program to check if number is even or odd

#include<stdio.h> int main() { // This variable is to store the input number int num; printf("Enter an integer: "); scanf("%d",&num);

Read More »


C Program to Sort set of strings in alphabetical order

#include<stdio.h> #include<string.h> int main(){ int i,j,count; char str[25][25],temp[25]; puts("How many strings u are going to enter?: "); scanf("%d",&count); puts("Enter Strings

Read More »


C Program to Sort set of strings in alphabetical order

#include<stdio.h> #include<string.h> int main(){ int i,j,count; char str[25][25],temp[25]; puts(“How many strings u are going to enter?: “); scanf(“%d”,&count); puts(“Enter Strings

Read More »


C Program to convert uppercase string to lowercase string

#include<stdio.h> #include<string.h> int main(){ /* This array can hold a string of upto 26 * chars, if you are going

Read More »


C Program to Convert Decimal to Octal Number

#include <stdio.h> #include <math.h> /* This function converts the decimal number "decimalnum" * to the equivalent octal number */ int

Read More »


C program to calculate and print the value of nPr

#include <stdio.h> void main() { int n, r, npr_var; printf("Enter the value of n:"); scanf("%d", &n); printf("\nEnter the value of

Read More »


C Program to Count Vowels and Consonants in a String using Pointer

  #include <stdio.h> int main() { char str[100]; char *p; int vCount=0,cCount=0; printf("Enter any string: "); fgets(str, 100, stdin); //assign

Read More »


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