Question: Please identify and explain the possible vulnerabilities of the program below and give a solution for those vulnerabilities once identified, thank you! #include #include using
Please identify and explain the possible vulnerabilities of the program below and give a solution for those vulnerabilities once identified, thank you!
#include
#include
using namespace std;
int main() {
char str[50];
for(int j = 0; j < 3; j++) {
cout<<"Give a string : ";
cin.getline(str,50);
int l=strlen(str);
for(int i=0; i swap(str[i],str[l-i-1]); cout<< "Reversed string : "<< str< } return 0; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
