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>
#include <alloc.h>
#include <string.h>

void main( )
{
    char *name[5] ;
    char str[20] ;
    int i ;

    clrscr( ) ;

    for ( i = 0 ; i < 5 ; i++ )
    {
        printf ( \"Enter a String: \" ) ;
        gets ( str ) ;
        name[i] = ( char * ) malloc ( strlen ( str ) + 1 ) ;
        strcpy ( name[i], str ) ;
    }

    printf ( \"\\nThe strings are:\" ) ;

    for ( i = 0 ; i < 5 ; i++ )
        printf ( \"\\n%s\", name[i] ) ;

    for ( i = 0 ; i < 5 ; i++ )
        free ( name[i] ) ;

    getch( ) ;
}

    Related Post:
  1. Program of matrix addition using function

  2. Program that illustrates arithmetic operators

  3. Sample program to print a string

  4. Program to print inventory report that counts total based on quantity and rate of items

  5. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES. INPUT STEPS FROM KEYBORD SUM =12-32+52-72+.....

  6. PROGRAM TO CONVERT BINARY TO DECIMAL USING FLOAT VALUES

  7. PROGRAM OF CREAT HEADER FILES FOR P_FORK,P_JOIN AND SHARED MEMORY

  8. Program to find first occurrence of a string in another string. Function should return position in string.

  9. Program to compute total minutes from given hours and minutes

  10. 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

  11. Reading of real numbers

  12. Program to print triangle in opposite pattern

  13. Program to append one string s2 to another string s1 i.e. concatenation of two strings use strcat function from string.h

  14. PROGRAM THAT WILL PRINT YOUR MAILING ADDRESS IN THE FOLLOWING FORM: FIRSTLINE:- NAME, SECOND LINE:-DOOR NO. STREET, THIRD LINE:-PIN CODE

  15. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES. INPUT STEPS FROM KEYBOARD SUM =1+4-9+16-25+36-.....

  16. PROGRAM TO FIND ANSWER OF THE FOLLOWING SERIES.INPUT STEPS FROM KEYBORD.SUM=e1+e2+e3+...(TAKE EXP FUNCTION FROM MATH.H)

  17. Project of Student information management

  18. Program to calculate months in a provided number of days from user

  19. Program to print triangle of numbers in reverse pattern

  20. Program gives maximum and minimum value of datatype