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

Assignment Help:

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

 

 

 


Related Discussions:- C program for select the char which u want

Some of the basic rules of cpp program, Ba s i c r u l e s o f C...

Ba s i c r u l e s o f C + + p r o g r a m : ·     I t m u s t h a v e o n l y o n e m a i n f u n c ti o n ·

Explain reference types, Reference Types The symbol "&" is interpreted ...

Reference Types The symbol "&" is interpreted as an address operator as well as AND operator. This operator is also used to declare a "reference variable". A reference is refer

What is the employ of ''using'' declaration?, A: A using declaration makes ...

A: A using declaration makes it possible to employ a name from a namespace without the scope operator.

C program for reverse the word in string, C Program for REVERSE THE WORD IN...

C Program for REVERSE THE WORD IN STRING #include conio.h> #include stdio.h> #include string.h> void main() {           char a[50],b[25][25],temp;           i

C program for the no are in ascending order , #include stdio.h> #include...

#include stdio.h> #include conio.h> #include string.h> void main() {           int i=0,j=0,k=0,l=0;           int a[3][3],temp[3][3];           clrscr();

Decode the code, Smugglers are becoming very smart day by day. Now they hav...

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Explain the pointer types, Pointer Types Pointer holds the address of a...

Pointer Types Pointer holds the address of an object, permitting for the indirect manipulation of that object. They are used in creating linked data structures like lists, tree

Decompression of files compressed with LZW, The files are meteorological ra...

The files are meteorological radar data whose decompression is badly needed for relative study. Please contact Kathy Lee (Email: ; Cell phone: 0086 15701799056) or Mr. Zhu (Email:

Explain call by reference, Call by Reference Passing variables(paramete...

Call by Reference Passing variables(parameters) to a function in C can be done in two ways - pass by value, also called as call by value and pass by address or also known as ca

We want database development, Presently we are using several spreadsheets t...

Presently we are using several spreadsheets to give weekly activity and income reports. Much of the information is being frequently re-keyed into several spreadsheets - we are look

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd