Coupon Accepted Successfully!



Write a note on literals.

Literals mean constants. That is the data items that never change their value during a program run.


Write the difference between a key word and an identifier.

Key word is a special word that has a special meaning and purpose. Key words are reserved and are a few. For example, goto, switch, else etc.

Identifier is the user-defined name given to a part of program viz, variable, object, function etc. Identifiers are key words that are not reserved. These are defined by the user but they can have letters, digits and a symbol like underscore.


List the token available in C++.

The tokens available in c++ are keywords, identifiers, literals, punctuators and operators.


What is escape sequence?

An escape sequence represents a single character and hence consumes one byte in ASCII representation.


Define real constant.

A real constant in fractional form must have at least in digit before a decimal point and atleast one digit after the decimal point. It may also have either + or – sign preceding it. A real constant with no sign is assumed to be positive.


Explain any five punctuators in detail.

The following characters are used as punctuators (also known as separators). They are

Parentheses      ( )   Opening and closing parentheses indicate function calls and function parameters. Parentheses also group expressions and isolate conditional expressions.

Braces       { }    Opening and closing braces indicate the start and end of a compound statement (block of code containing more than one executable statement)

Comma       ,    It is used as a separator in a function argument list.


Semicolon       ;    It is used as a statement terminator. Every executable statement is terminated by a semi colon (;)

Brackets      [ ]    Opening and closing brackets indicate single and multidimensional array subscripts.



List the unary operators.

The unary operators are as below
& Address operator
* Indirection operator
+ Unary plus
- Unary minus
++ Increment operator
-- Decrement operator
! Logical negation




void main()


cout<< " Deepika";



Discuss <iostream.h> in detail.

In C++ all devices are treated as files. Thus the standard input devices, standard output devices and the standard error device are all treated as files. At its lowest level, a file is interpreted simply as a sequence, or a stream of bytes. At this level the notation of a data type is absent. i.e. data is treated simply as sequence of bytes without considering its data type. However, at the user level, a file consists of a sequence of possibly intermixed data types-characters, arithmetic characters and class objects.


Explain comments in detail.

Comments are pieces of code that the compiler discards or ignores or simply does not execute. The purpose of comments is only to allow the programmer to insert some notes or description to enhance readability or understandability of the program. There are two ways to insert comments in C++ program. The first is single line comment with // (double forward slash) and multiline or block comment with /*…….*/.


Write notes on output operator with example.

The output operator ("<< ")is also called as stream insertion operator is used to direct a value to standard output. For example

cout << " the sum of two numbers 5 +10 =" ;

cout << 5 +10;


Write notes on input operator with example.

The input operator (">> "), also called as stream extraction operator, is used to read a value from standard input. For example

cin >> " the enter any two numbers to add";

cin >> value1;

cin >> value2;


Define semantic error.

Semantic error occurs when statements are not meaningful.


what is called as run time error?

A run time error is that occurs during the execution of a program. It is caused due to some illegal operation taking place or unavailability of desired or required condition for the execution of the program.


What do you understand by code generator?

After removal of all errors in a program, compiler compiles the program to translate the program text in object or assembly instruction set which is understood by the computer. This process of translation is called code generation.


List any five keywords.

The keywords are auto, double, public, throw and while statement.


Give the symbol for carriage return.


Test Your Skills Now!
Take a Quiz now
Reviewer Name