0

Is it possible to display the mathematical symbol for "is element of" in C?

element of

For example:

printf("a is element of A");
John Ledbetter
  • 13,557
  • 1
  • 61
  • 80
user3139356
  • 109
  • 1
  • 3
  • 9
  • 2
    Unicode U+2208: ∈ Does your environment support unicode? – AShelly Dec 27 '13 at 17:59
  • @dvnrrs: that's for a different language, C++, though the topics are related. – Jonathan Leffler Dec 27 '13 at 18:00
  • AShelly: Yes, dvnrrs: Thank you – user3139356 Dec 27 '13 at 18:01
  • 3
    If the environment supports Unicode, then `\u2208 or \U00002208 would identify the symbol. – Jonathan Leffler Dec 27 '13 at 18:01
  • 1
    In UTF-8, it would be '\xe2\x88\x88' if your locale can be set to UTF-8 (or if it already is UTF-8). Otherwise, you would need to have a way to print Unicode strings. Some platforms allow you to use `wprintf(L"a \u2208 A\n");`, assuming `__STDC_ISO_10646__` is `#define`d. Otherwise, we will need to know what platform you're working with. –  Dec 27 '13 at 18:40

0 Answers0