Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main()
- {
- char a1[100] = "Vom Eise befreite er die Windschutzscheibe";
- char a2[100] = "Strom und Baeche";
- char b1[100] = "Durch des Frueh";
- char b2[100] = "lings und anderes";
- char b3[100] = "holden, belebenden Blick";
- char a[100];
- char b[100];
- //Mit Funktionen der C-Bibliothek die ersten Zwei Zeilen erstellen
- strncpy(a, a1, 16);
- a[16] = '\0';
- strcat(a, " sind ");
- strcat(a, a2);
- strcpy(b, b1);
- strncat(b, b2, 6);
- strcat(b, b3);
- cout << a << endl;
- cout << b << endl;
- //Vom Eise befreit sind Strom und Baeche
- //Durch des Fruehlings holden, belebenden Blick
- char c[10] = "123.45";
- char d[10] = "12345";
- cout << c << endl;
- cout << d << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment