C program for select the char which u want , C/C++ Programming

C Program for SELECT THE CHAR WHICH U WANT

#include stdio.h>

#include conio.h>

void main()

{

 

          void substr(char[], int *, int *);

          int a,b;

          char ch[20];

          clrscr();

          printf("ENTER THE STRING:  ");

          gets(ch);

          printf("\nENTER THE POSITION: ");

          scanf("%d",&a);

          printf("\nEnter The Length: ");

          scanf("%d",&b);

          substr(ch,&a,&b);

          getch();

}

void substr(char ch[20],int *s, int *t)

{

          int i;

          for(i=*s;i<(*t+*s);i++)

                   putchar(ch[i]);

}

 

OUTPUT :

ENTER THE STRING : KAMLESH

ENTER THE POSITION: 2

ENTER THE LENGTH: 3

MLE

 

 

 

Posted Date: 9/10/2012 8:15:57 AM | Location : United States







Related Discussions:- C program for select the char which u want , Assignment Help, Ask Question on C program for select the char which u want , Get Answer, Expert's Help, C program for select the char which u want Discussions

Write discussion on C program for select the char which u want
Your posts are moderated
Related Questions
Project Description: I need to convert AFL code of Amibroker to DLL plugin to hide original formula, and also to protect the DLL and making it hardware locked. I need to wrap th

The question description: You are required to make a C++ program to conduct timber component (beam and column) structural design according to EC5 (all the relevant design codes

Generate a class node that contains an integer id, a position (x, y)  and a vector of 0 5,  generate a set of  x nodes each with random connectivity n.    Implement an algorith

program for singly linked list with out header

a palindrome is a string that reads the same from bhote the ends

write a program that calculates points along a rhodonea curve.... ? int fillArray( double data[ ], int nValues, double min, double max ); o Used to fill in the theta array. Return

Damjibhai and Shamjibhai are two jeweler friends. They decide to play a simple game. The game comprises of removing the jewels for polishing, turn by turn. Once a jewel is removed

draw the flow chart to print the fibonacci series upto n th terms

I have a Matlab assignment and I have the assignment description+ algorithm + and the output sample. the files are on a dropbox folder and you can download them from the link below

Draw a circle in c program: void main() { clrscr(); int i,r=50,t,j,x,y; int gd,gm; gd =DETECT; initgraph(&gd,&gm,""); for(x=50;x for(y=50;y {   i