1. What is the use of declaration statement?

v Declaration means specifying something is advance.

v In, c++ declaration means instructing the compiler previously about the variable / identifier, functions etc, which we are going to use.

Example: int name;

Void add( );

2. What are keywords?

v Some words which have special meaning in a language.

v Also called as reserved words.

v These words cannot be used by programmer for variable, function names etc.

Example:

if, else, swithcase, for, auto, while, do, break, continue.

3. What is the use of sizeof() Operator?

v Size of is a C\C++ Operator.

v It is used to measure the size of the data type (fundamental or derived) in bytes.

Example:-

v cout << sizeof(int); - will display 2, i.e., Size of int data type.

4. What do you mean by Conditional Operator (or) Ternary Operator?

v A Conditional operator is also called ternary operator.

v It has three parts.

o Condition.

o True part.

o False part.

v Syntax:-

v () ? ;· ;

v Example:-

Max=(a>b)?a:b; -To find bigger number using ?:


Like it on Facebook, Tweet it or share this article on other bookmarking websites.

No comments