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 <stdio.h>
#include <conio.h>
void main(){
     int m,n,i,len;
     char str[40]=\"\",substr[40]=\"\";
     clrscr();
     printf(\"*****SubString Demo*****\\n\\n\");
     printf(\"Enter string : \");
     scanf(\"%[^\\n]s\",str);
     for(m=0;str[m]!=\'\\0\';m++);

     len = m;

     printf(\"\\nString Extracting Details\\n\");
     strt:
     printf(\"enter starting position : \");
     scanf(\"%d\",&m);
     printf(\"enter ending position : \");
     scanf(\"%d\",&n);

     if(m<=0 || m>len || n<m || n<=0 || n>len){
       printf(\"\\n\\nInvalid Input\\n\\n\");
       goto strt;
     }
     else{
    for(i=0;m<=n;m++,i++)
       substr[i]=str[m-1];
    substr[i]=\'\\0\';
    printf(\"\\nSub String is %s\",substr);
       }

   getch();
}

    Related Post:
  1. Program to search and/or replace a word in C program

  2. Program for block scheduling technique to solve following expression x[i]=x[i+1]

  3. Program to check if given strings form an acrostic

  4. program that takes a number from user and calculates its logarithm value to the base 10 and e, exponentiation, sin value, cosine value and square root

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

  6. Program read a file name, serach it in C Drive, if multiple files are found, then display a list of these files with path on the screen...

  7. PROGRAM TO CONVERT BINARY TO DECIMAL USING FLOAT VALUES

  8. Program to build a binary search tree from an array

  9. Program to find the shortest path

  10. Program to find area of rectangular

  11. Program to do sum of numbers from 1 to 10, by dividing the job into two processes parent and one child Using Shared Memory

  12. Program to generate Summary of a survey

  13. Singly Linked list with following operations INSERT AT STARTING, INSERT AT MIDDLE, INSERT AT END, DELETE FIRST NODE, DELETE LAST NODE, DELETE MIDDLE

  14. Program that shows how to perform explicit cast of a variable

  15. Calculate total distance traveled by a vehicle in t seconds is given by DISTANCE = UT + (A * T * T)/2.

  16. JACOBIAN METHOD

  17. PROGRAM TO FIND SUM OF SQUARE UP TO N NUMBERS

  18. Program to find sum, average and deviation of input numbers using parallel processing

  19. Program to multiply matrix (10 x 10) with a vector using variation in Loop Splitting using multiple barriers

  20. USE OF realloc AND free FUNCTIONS

 
 
Didn't find what you were looking for? Find more on Program to get substring