Why? Help please | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why? Help please

//Why this outputs f? #include <iostream> using namespace std; char d ='baf'; int main() { cout<<d; return 0; }

11th Feb 2019, 2:42 AM
Oscar A. Funes
Oscar A. Funes - avatar
3 Answers
+ 3
See "notes" section of the below link: https://en.cppreference.com/w/cpp/language/character_literal The implementation and support of multicharacter literals is specific to the compiler.
11th Feb 2019, 2:59 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
string instead of char
11th Feb 2019, 7:20 AM
Nazberdi Nazberdiyev
Nazberdi Nazberdiyev - avatar
0
hi my name is thrasiboulas and my favorite team is niki volou ayta eidela na sas po geia sas aggli fili moy geiaaaaaa
14th Feb 2019, 10:31 AM
Μιχάλης Καρμοίρης