#include<iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main(){
char s[100];
cout<<"enter the string :"<<endl;
gets(s);
//memcpy
char a[100];
memcpy(a,s,strlen(s)+1);//here if we decrease bytes to be copied to a value less than length of s i.e.(strlen(s)), then s is getting destroyed ...some garbage value is coming
cout<<" a : "<<a<<" s : "<<s<<endl;
}