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

What is the issue which auto_ptr objects address?, A: If you employ auto_pt...

A: If you employ auto_ptr objects you would not need to be concerned along with heap objects not being deleted even if the exception is thrown.

C program to returns the string, Program is to take two arguments and retur...

Program is to take two arguments and returns the string: Program is to take two arguments and returns the string which is larger the larger string has larger ascii value invok

Blackjack Game help, I can''t figure out how to stop the programming from h...

I can''t figure out how to stop the programming from hitting for the player even when they type in stand.

Compiler design limiting instruction, Ravi is a newbie to the programming a...

Ravi is a newbie to the programming and while learning the programming language he came to know the following rules: · Each program must start with ''{'' and end with '

#psuedocode, Create a pseudocode in getting Calendar Quarter. The program s...

Create a pseudocode in getting Calendar Quarter. The program should identify which quarter falls the given date. Note: Consider the date format DDMMYYYY.

C program, what will be the c program for ideal gas equation.

what will be the c program for ideal gas equation.

Define procedure to return the sum of the odd elements, (a) Define a proced...

(a) Define a procedure (deep-member x e) that takes a list x and an element e and returns #t if the element e is in the list or in any lists that the list x contains. e.g., (dee

Help me for an programming contest .., Pebble Merchant Problem Description...

Pebble Merchant Problem Description 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

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