+ 2

what data type is used to declare data containing both integers and strings (eg gos123.)

12th Sep 2016, 5:17 PM
Cody Arthur
Cody Arthur - avatar
6 Answers
+ 8
String itself for example #include <iostream> using namespace std; int main() { string name; cout<<"enter ur username"<<endl; cin>>name; cout<<"ur name is "<<name<<endl; return 0; } output enter ur username suhailpappu123 ur name is suhailpappu123
12th Sep 2016, 5:45 PM
Suhail Pappu
Suhail Pappu - avatar
+ 4
String data type is used in these cases.
2nd Feb 2017, 5:45 AM
Ashu Bagul
Ashu Bagul - avatar
+ 1
string
12th Sep 2016, 6:18 PM
Sushant Shukla
Sushant Shukla - avatar
+ 1
Variable types like int, and float tell the computer that you are dealing with a NUMERIC value. This allows the computer to know that you are assigning a quantity therefore allowing you to do equations. Otherwise, if you treat the number three as a character, the computer will recognize it as a print and not assign any value to it.
14th Oct 2016, 11:25 PM
Sandra Setti
Sandra Setti - avatar
+ 1
char data type
20th Dec 2016, 5:56 PM
Ishan Jain
Ishan Jain - avatar