3.Discuss Features of C++
As we all know that C++ is an extension of the C language, it possesses many features which C did not. Features like cross-platform and mid-level programming give C++ an upper hand over many programming languages. We will dedicate this tutorial to make you known to those C++ features.
Various features of C++ are given below:
Object-oriented
Portability
Compiler based
Structured programming language
Fast & Powerful
Mid-level programming language
Memory Management
Rich Library
Case-sensitive
Extensible
Recursion
Popular
Simple
Pointers
14.Elaborate the Compilation Process of C++
It is fundamental to know how C++ compilation works to understand how programs are compiled and executed. Compiling C++ source code into machine-readable code consists of the following four processes:
Preprocessing the source code.
Compiling the source code.
Assembling the compiled file.
Linking the object code file to create an executable file.
15.Give History of C++
C++ was developed by Bjarne Stroustrup at Bell Laboratories over a period starting in 1979. Since C++ is an attempt to add object-oriented features (plus other improvements) to C, earlier it was called as “C with Objects”. As the language developed, Stroustrup named it as C++ in 1983. The name C++ suggests “C incremented” (recall the ++ is an increment operator of C).
C++ was made available outside Bell Laboratories in 1985. The first commercial C++ compiler, Cfront, was released in 1985. It was only a front-end compiler for C. The American National Standard Institute (ANSI) formed a committee for (precise description of computer language) C++, in 1989. The first draft standards were published in 1995.
16.Write a simple C++ Program to display the text “Hello World !”
17.What are C++ Tokens ?
A token is the smallest element of a C++ program that is meaningful to the compiler. The C++ parser recognizes these kinds of tokens: identifiers, keywords, literals, operators, punctuators, and other separators. A stream of these tokens makes up a translation unit. Tokens are usually separated by white space.
The parser recognizes keywords, identifiers, literals, operators, and punctuators. Preprocessing tokens(like #include, #define, #if_def, etc.) are used in the preprocessing phases to generate the token stream passed to the compiler. The preprocessing token categories are header names, identifiers, preprocessing numbers, character literals, string literals, etc. that do not match one of the other categories. Character and string literals can be user-defined literals. Preprocessing tokens can be separated by white space or comments.
18.Discuss Types of C++ Tokens.
The text of a C++ program consists of tokens and white space. A token is the smallest element of a C++ program that is meaningful to the compiler. The C++ parser recognizes these kinds of tokens:
Keywords
Identifiers
Numeric, Boolean and Pointer Literals
String and Character Literals
User-Defined Literals
Operators
Punctuators
Do'stlaringiz bilan baham: |