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

Should my constructors employ"assignment"or"initialization, Should my const...

Should my constructors employ "assignment" or "initialization lists"?

Area under the curve, Write a program to find the area under the curve y ...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Hwid spoofer for windows 7, Project Description: I want a simple program...

Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program and press "random" button to spoof to

Introduction of c, Discuss the saleint featuresand application of c

Discuss the saleint featuresand application of c

Menus, create a shopping cart in c++

create a shopping cart in c++

Explain virtual base classes, Virtual Base Classes This ambiguity can b...

Virtual Base Classes This ambiguity can be resolved if the class derived have only one copy of the class base. This can be done by making the base class a virtual class. This k

Constructor, Why copy constructor accepts reference to an object and not t...

Why copy constructor accepts reference to an object and not the object itself, whether ah hence it we do otherwise

Microprocessors and motherboards, The heart of the modern electronic system...

The heart of the modern electronic system is the microprocessor e.g. the video, sound, game consoles, portable phones and domestic appliances. Let us consider the heart of a home c

Last ant on rod, There are ''''n'''' ants on a ''''n+1'''' length rod. The ...

There are ''''n'''' ants on a ''''n+1'''' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are mov

Maze, How would I make a maze in C++? I would prefer to use the recursion m...

How would I make a maze in C++? I would prefer to use the recursion maze generation algorithm if possible, thanks!

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