March 2022 0 4 Report
Zamiana liter z małych na duże (uppercase) c++ //Łańcuchy znakowe

//Tablice znakowe char*

// \0 oraz NULL

//ASCII


#include

using namespace std;


char lancuchZnakowy[5] = {'c', 'h', 'a', 'r', '\0'};

char lancuchJakString[5] = "char";

char tekstDynamicznaWielkosc[] = "Costam costam dlugi tekst";


int main()

{

cout << lancuchZnakowy << " - dlugosc tego lancucha to: " << sizeof(lancuchZnakowy) << endl;

cout << lancuchJakString << " - dlugosc tego lancucha to: " << sizeof(lancuchJakString) << endl;

cout << tekstDynamicznaWielkosc << " - dlugosc tego lancucha to: " << sizeof(tekstDynamicznaWielkosc) << endl;



//dodatkowe

if ("A" == "a")

{

cout << "y";

}

else

{

cout << "n";

}

//


return 0;

}


//Zadanie

// Długi tekst - nalezy go przeszukac i zamienic wszystkie a na A

// Zmienić wszystkie znaki na duże (uppercase) bez sprawdzania == "A" == "B" itp

//Dodatkowe

// Usunac wszystkie spacje z tekstu

More Questions From This User See All

Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.