0
#include <iostream>

int main() {
  std::cout << 'hello';
  return 0;
}

This program output is:

1701604463

I wonder why it actually runs, although the compiler gives a warning message: character constant too long for its type.

What these numbers actually mean, are they garbage digits?

Mohamed Magdy
  • 345
  • 3
  • 15

1 Answers1

3

It is multicharacter literal which has type int.

Multicharacter literal, e.g. 'AB', has type int and implementation-defined value.

Oblivion
  • 7,176
  • 2
  • 14
  • 33