C Programming Tutorial

 
 
 

Advanced Programming

Array

One dimensional array Two dimensional Array Two dimensional array pointers Array of pointers Print array Print Array - for loop Print array in reverse Print address array - for loop Multidimentional array - function Print address array - pointers Print reverse string of array Print array ascii value-without atoi Character array - upper case Multiplication table - 2D array Passing array to function Max or greatest value in array Merge sorted array Array of structure Array of pointers to string Array within a structure

String Programs

Copy string Substring of string String concatination Vowel in string Swap char in string Palindrome string Rotate string Bubble sort of strings Sorting of words Encode decode string Compress string

File Programs

Read write in 2 files Add,edit,delete,search in file Add,search using structure Append in file Merge file Count word,line,char in file Count record - struct fread() example fwrite() example fopen() example fclose() example fscanf() and fprintf() fseek() example Error handling in file op Find odd,even num Odd even numbers in file Max, min age in class Random numbers file Preprocessor in 2 files Encode decode in file

Bios Programming

biosequip( ) - sys confi biosdisk( ) - partition tbl info Pc type-bios data area File allocation table Telephone directory

TSR Programming

Interchange letters Interchange letters on screen Unload TSR on key press-keyboard Unload TSR - timer interrupt Activate, deactivate TSR Print alphabet from printer Repeat key press Keep caps on Make ctrl, alt key pressed

Interrupt Programming

Restart computer Conventional memory of sys Save IVT in file Print string-interrupt 21h Read char-interrupt 21h Read char with echo-interrupt 21h Delete file-interrupt 21h Delete directory-interrupt 21h Get set system date Show system configuration Search, delete file in dir Display multiple file in dir

Mouse Programming

Text mode mouse handling Graphics mode mouse handling Double click of mouse
 
 

Image

 # include <stdlib.h>
 # include  <stdio.h>
 # include  <conio.h>
 # include   <bios.h>
 # include    <dos.h>

 int main( )
 {
    int iCount=15;
    unsigned int uiMaxValue=32768;

    unsigned int uiAX=biosequip( );

    clrscr( );
    textmode(BW80);

    printf(\" * * * * * * * * * *  System Configuration  * * * * * * * * * *\\n\\n\");
    printf(\" System Configuration Word Value = \");

    for(iCount=15;iCount>=0;iCount--)
    {
       if((iCount%4)==3)
      printf(\" \");

       if((uiAX&uiMaxValue)==uiMaxValue)
      printf(\"1\");

       else
      printf(\"0\");

       uiMaxValue/=2;
    }

    printf(\"\\n\\n\\r Boot From Disk = \");

    switch((uiAX&0x0001))
    {
       case 0 : printf(\"No\");
        break;

       case 1 : printf(\"Yes\");
        break;
    }

    uiAX>>=1;

    printf(\"\\n Math Co-Processor Installed = \");

    switch((uiAX&0x0001))
    {
       case 0 : printf(\"No\");
        break;

       case 1 : printf(\"Yes\");
        break;
    }

    uiAX>>=1;

    printf(\"\\n Motherboard RAM Size = \");

    switch((uiAX&0x0003))
    {
       case 0 : printf(\"16k\");
        break;

       case 1 : printf(\"32k\");
        break;

       case 2 : printf(\"48k\");
        break;

       case 3 : printf(\"64k\");
        break;
    }

    uiAX>>=2;

    printf(\"\\n Initial Video Mode = \");

    switch((uiAX&0x0003))
    {
       case 0 : printf(\"unused\");
        break;

       case 1 : printf(\"40x25 BW with color card\");
        break;

       case 2 : printf(\"80x25 BW with color card\");
        break;

       case 3 : printf(\"80x25 BW with mono card\");
        break;
    }

    uiAX>>=2;

    printf(\"\\n Number of Disk Drives = %d\",((uiAX&0x0003)+1));

    uiAX>>=2;

    printf(\"\\n Direct Memory Access (DMA) = \");

    switch((uiAX&0x0001))
    {
       case 0 : printf(\"Available\");
        break;

       case 1 : printf(\"Not Available\");
        break;
    }

    uiAX>>=1;

    printf(\"\\n Number of COM (Serial) Ports = %d\",(uiAX&0x0007));

    uiAX>>=3;

    printf(\"\\n Game I/O Port = \");

    switch((uiAX&0x0001))
    {
       case 0 : printf(\"Not Available\");
        break;

       case 1 : printf(\"Available\");
        break;
    }

    uiAX>>=1;

    printf(\"\\n Serial Printer Attached = \");

    switch((uiAX&0x0001))
    {
       case 0 : printf(\"No\");
        break;

       case 1 : printf(\"Yes\");
        break;
    }

    uiAX>>=1;

    printf(\"\\n Number of Parallel Printers Installed = %d\",(uiAX&0x0003));
    printf(\"\\n\\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\");

    getch( );
    return 0;
 }

    Related Post:
  1. Program to display numbers using do while loop

  2. Program to find co-relation between two data sets defined and initialise by the user

  3. Program to do sum of numbers from 1 to 10, by dividing the job into two processes using Shared Memory

  4. Program to print pyramid of small letter and capital letter abcd

  5. Program to display diamond triangle of numbers

  6. Program to find first occurrence of a character in a string. Function should return characters position in string. (Use strchr function from string.h

  7. Use of subscripted members in structures , ARRAYS WITHIN A STRUCTURE

  8. Illustration of if else statement

  9. Program to find length of a string

  10. Program to concatenate one linked list at end of another and than to erase all nodes present in the linked list

  11. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES. SUM=e1+e2+e3+...

  12. Program to merge link list

  13. WRITE A PROGRAM ENTERED THROUGH THE KEYBOARD FOR KILO METERS AND METERS

  14. PROGRAM FOR SECANT METHOD OF PARTICULAR EQUATION IS log(x)-cos(x)

  15. Program that will round a floating-point number to an indicated decimal place no. 17.457 would yield the value 17.46 when it is rounded off to 2 de

  16. Example 2 to display array values and address of an array using pointers

  17. Program to read two positive numbers and interchange its values using *(mul) and /(div) operators and without using any extra variable

  18. Program to display reverse triangle of characters

  19. Program to show the Basic Mouse Handling in Text Mode

  20. Program that reads the encoded alphabetic text from a file and produces decoded file by replacing each character with the character that occurs five

 
 
Didn't find what you were looking for? Find more on Program to show the System Configuration using biosequip( ) function