Tuesday, January 26, 2021

String function in c++ with Eaglesoft

 


#include<iostream>
#include<string.h>
using namespace std;
int main()
{
    char str[100];
    char cpy[100];
    cout<<"Enter you Name:"<<endl;
    gets(str);
    
    // convert all string into lower case 
    // strlwr(str);

    // convert all string into upercase 
    // strupr(str);

    // copy string 
    strcpy(cpy,str);

    cout<<"Name :"<<cpy<<endl;
   
    return 0;
}

No comments:

Post a Comment