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
Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc, which increments its argument by 1, and dec, which decrements

Write algorithms to implement the insertion and deletion operations.

I. COURSE DESCRIPTION Develops a working knowledge of object-oriented concepts in areas of classes, inheritance, data structures, error handling, templates and file processing.

a program to accept average, if average is 75 to 85 print it out else bypass using counter. enter and process 5 records

A: Use operator overloading to present a friend left-shift operator, operator #include class Fred { public: friend std::ostream& operator ... private: int i_; // onl

what is local and global variable?give me some example to understand better

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

what are 3 conditions under which the sequential search of a list is preferable to binary search?

Pls i only need help with program 2. #include #include using namespace std; int main() { int FilingStatus; cout cout cout cout cout cout

Default argument: When the argument is missing then the function will read the default value of the missing argument.  To make use of default argument functionality the argu