how to create an array of char in c++
// strings and NTCS:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
char question1[] = "What is your name? ";
string question2 = "Where do you live? ";
char answer1 [80];
string answer2;
cout << question1;
cin >> answer1;
cout << question2;
cin >> answer2;
cout << "Hello, " << answer1;
cout << " from " << answer2 << "!\n";
return 0;
}char foo [20];
Also in C:
- how to input a string into a char array cpp
- atol c.
- int to float c
- pointer arithmetic C
- classification report to excel
- code: 'EADDRINUSE', [0] errno: 'EADDRINUSE', [0] syscall: 'listen', [0] address: '::', [0] port: 5000
- c copy string
- XAudio2 C
- donut c code
- read a document in c getting name from console
- allocate memory c
- Route::resource
- how to check where the last char is in a string c
- python web crawler
- fgets in c
- even odd numer c
- add border to image android
- how to ascii art in c
- how to modulo decimal c
- bcopy
- 4k stogram chave
- read a binary file c
- c program to find number of days in a month using switch case
- how to break a loop in c