Answer:
#include <bits/stdc++.h>
using namespace std;
int main() {
string ms;
getline(cin,ms);
stack<char>st;
for(int i=0;i<ms.length();i++)//Inserting every element in the stack..
{
st.push(ms[i]);
}
while(!st.empty()) //doing operation until the stack is not empty..
{
char a=st.top();//accessing the top element of the stack...
st.pop();//removing the head.
cout<<a;//printing the character..
}
return 0;
}
Input:-
murder
Ouput:-
redrum
Explanation:
An easy way to reverse anything is to use stack.Since stack is LIFO type data structure so the last item in will be the first one to get out hence it reverses the elements.So inserting every element of the string into the stack of characters and then printing the every element of the stack from top to bottom.
In computing, a programming language specification (or standard or definition) is a documentation artifact that defines a programming language so that users and implementors can agree on what programs in that language mean.
I was unable to click on any of my notifications but that got fixed on its own a day later.
Answer:
Before providing CPR is the correct option.
Explanation:
CPR refers to the cardiopulmonary resuscitation in which the user follows the emergency treatment of respiration from mouth to mouth and chest compression. If any person complete training of Adults/Adolescents then they have to activate or call the EMS before providing cardiopulmonary resuscitation.