Write a PHP program which will ask the user to key a paragraph or sentence. Then it will help the user to count the character that specified by the user.
2. Write a C++ program to show the sorting methods based on user input with the explanation. You can choose any TWO (2) of the sorting methods as below.
- Selection
- Insertion
- Merge
- Bubble
- Quick
D is hosting a lunch and R is incharge of the sitting plan D’s dining table is an infinite row of seats with D at one end. Each of D’s guests represents a alphabet (a to z). D want guests to be seated such that the resulting string formed from the alphabets is smallest He didn’t tell total number of guests.
The rules:-
● Seats are allotted in sequential order, a guest who arrives later must be further from D
● An incoming guest must be assigned a seat, as soon as he arrives
● Once a guest take seat, you can’t ask them to move to some other seat.Even if
the seat in front of him is empty.
● But you can make a guest disappear, D has allowed to make at most k of his guests disappear but you can’t remove more than k guests.
● No seat should remain empty b/w any 2 guests or b/w guest and D, a series of empty seats would be in the end. You are R, design a code using an efficient data structure that will follow to keep track of which guest to assign which seat.
Write a program that reads a single line of input and prints the first and last characters of the given input and prints the asterisk character (*) in place of the remaining characters.Input