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 to Print String using Pointer

#include <stdio.h> int main() { char str[100]; char *p; printf("Enter any string: "); fgets(str, 100, stdin); /* Assigning the base

Read More »


C Program to Check Whether a Number is Prime or Not

Program to Check Prime Number #include <stdio.h> int main() { int n, i, flag = 0; printf("Enter a positive integer:

Read More »


C program to convert Celsius to Fahrenheit using while loop

To convert Celsius to Fahrenheit #include <stdio.h> #include <stdlib.h> int main() { float celsius, fahrenheit; printf(“\nEnter temperature in celsius: “);

Read More »


C Program to Make a Simple Calculator Using switch case

Simple Calculator using switch Statement #include <stdio.h> int main() { char operator; double first, second; printf("Enter an operator (+, -,

Read More »


C Program to Find ASCII Value of a Character

Program to Print ASCII Value #include <stdio.h> int main() { char c; printf("Enter a character: "); scanf("%c", &c); // %d

Read More »


C Program to Find the Size of int, float, double and char

Program to Find the Size of Variables #include<stdio.h> int main() { int intType; float floatType; double doubleType; char charType; //

Read More »


C Program to Add Two Integers

Program to Add Two Integers #include <stdio.h> int main() { int number1, number2, sum; printf("Enter two integers: "); scanf("%d %d",

Read More »


C Program to Multiply Two Floating-Point Numbers

Program to Multiply Two Numbers #include <stdio.h> int main() { double a, b, product; printf("Enter two numbers: "); scanf("%lf %lf",

Read More »


C Programming Code To Create Pyramid

Program to print half pyramid using *   #include<stdio.h> int main() { int i, j, rows; printf("Enter number of rows:

Read More »


C Program to Display Characters from A to Z

Program to Print English Alphabets #include <stdio.h> int main() { char c; for (c = 'A'; c <= 'Z'; ++c)

Read More »


C Program to Generate Multiplication Table

Multiplication Table Up to 10 #include <stdio.h> int main() { int n, i; printf("Enter an integer: "); scanf("%d", &n); for

Read More »


C Program to Find the Largest Number Among Three Numbers

Using if Statement #include <stdio.h> int main() { double n1, n2, n3; printf("Enter three different numbers: "); scanf("%lf %lf %lf",

Read More »


C Program to Reverse a Number

Reverse an Integer #include <stdio.h> int main() { int n, rev = 0, remainder; printf("Enter an integer: "); scanf("%d", &n);

Read More »


C Program to Display Fibonacci Sequence

The Fibonacci sequence is a sequence where the next term is the sum of the previous two terms. The first

Read More »


C Program to Find Factorial of a Number

The factorial of a positive number n is given by: factorial of n (n!) = 1 * 2 * 3

Read More »


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