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
 
 
#include<stdio.h>
#include<conio.h>
void main()
{
        char a[10];
        int i,j,n,a1[10];
        clrscr();
        printf(\"\\n Please Give The Value of N:  \");
        scanf(\"%d\",&n);
        for(i=0;i<n;i++)
        {
            flushall();
            printf(\"\\n enter value of a[%d] :\",i);

            scanf(\"%c\",&a[i]);
            a1[i]=a[i];
            printf(\"\\n value of %c = %d \",a[i],a1[i]);

        }
        getch();
}

*********************** OUTPUT *********************************************

     Please Give The Value of N:  5

     enter value of a[0] :a

     value of a = 97
     enter value of a[1] :b

     value of b = 98
     enter value of a[2] :c

     value of c = 99
     enter value of a[3] :d

     value of d = 100
     enter value of a[4] :A

     value of A = 65

********************************************************************************

    Related Post:
  1. PROGRAM TO CONVERT BINARY FLOTING POINT TO HEXADECIMAL FLOTING POINT

  2. Program to find the shortest path

  3. Program of histogram by calculating the partial histograms and consolidating in the end to get the final histogram

  4. Sum of numbers from 1 to 10, by dividing the job into two processes

  5. Program of minimum cost problem

  6. Write a function to print following : e.g. space paces acesp cespa espac

  7. PROGRAM TO READ NUMBERS, N1 AND N2 ARE INTERCHANGE WITHOUT USING EXTRA VARIABLES.N1=10, N2=20 THEN O/P IS N1=20, N2=10 USING MULTIPLICATION, DIVISION

  8. PROGRAM FOR MATRIX VECTOR MULTIPLICATION USING INNER LOOP SPLITING FOR N NO.OF PROCESSES

  9. PROGRAM OF Matrix Multiplication

  10. Program of solving the dependency in the linear recurrence relation x[i] = x[i-1] + y[i] using block scheduling

  11. Program to print input text in upper case

  12. Program of finding factorial recursively

  13. PROGRAM FOR FORWARD DEPENDENCY X[I]=X[I-1] USING BLOCK SCHEDULING AND N NO.OF PROCESSES

  14. Program to receive marks in 2 subjects and output whether the student has passed, failed or is allowed to reappear in any subject

  15. Program to display series 2,4,16,256... using while loop

  16. Program to print WORDPROCESSING as WORD PROCESSING, WORD, PROCESSING, W.P.

  17. Program that displays use of register variable

  18. PROGRAM TO CONVERT BINARY FLOTING POINT TO OCTAL FLOATING POINT

  19. For a certain electrical circuit with an distance L and resistance R, the damped natural frequency is given by Frequency = sqrt((1/L*C)

  20. Program to take input text from a user. Also take 2 words one that need to replace and one that will be replaced from sentence