In: Computer Science
1. Which are the two main problems solved by trigraphs?
2. Which are the two institutions responsible for controlling and
documenting C language? 3. What is the difference between C11 and
C95 standards?
1. Which are the two main problems solved by trigraphs?
The symbols [ ] { } ^ \ | ~ #
are frequently used
in C programs, but in the late 1980s, there were code sets in use
(ISO 646 variants, for example, in Scandinavian countries) where
the ASCII character positions for these were used for national
language variant characters (e.g. £
for #
in the UK; Æ Å æ å ø Ø
for { } { } | \
in
Denmark; there was no ~
in EBCDIC). This meant that it
was hard to write C code on machines that used these sets.
To solve this problem, the C standard suggested the use of combinations of three characters to produce a single character called a trigraph. A trigraph is a sequence of three characters, the first two of which are question marks.
Sequence Replacement ======== =========== ??= # ??( [ ??/ \ ??) ] ??' ^ ??< { ??! | ??> } ??- ~
Q2. Which are the two institutions responsible for controlling and documenting C language?
1.ANSI ( American National Standards Institute ) 2. ISO (International Organization for Standardization )
Q3. Difference b/w C11 and C95?
C95: A minor update was released in 1995, sometimes referred to as "C95". This was not a major revision, but rather a technical amendment formally named ISO/IEC 9899:1990/Amd.1:1995. The main change was introduction of wide character support.
C11:In 2011, the C standard was changed again (ISO 9899:2011).
This version is called C11. Various new features like
_Generic
,
_Static_assert
and thread support
were added to the language. The update had a lot of focus on
multi-core, multi-processing and expression sequencing. From
2011-2017, this was "the C language".