Saturday, December 5, 2015

Programming & Data structures II

1. What is an identifier?
Identifiers are names for various programming elements in c++ program. such as variables,
arrays,function, structures, union, labels ect., An identifier can be Composed only of uppercase,
lower case letter, underscore and digits, but should start only with an alphabet or an underscore.
2. What is a keyword?
Keywords are word whose meanings have been already defined in the c compiler. They are also
called as reserved words.
(ex) main(), if, else, else, if, scanf, printf, switch, for, goto, while ect.,
3. Define constant in c++.
Constants in c++ refers to fixed values that do not change during execution of a program.
4. Define a variable.
A quantity ,Which may vary during execution of a program is called as a variable.
5. What are unary operators?
The operators that act upon a single operand are called as unary operators. The unary operators
used in c++ are - , ++, -- and sizeof operators.
6. What are binary operators?
The operators that act upon two operands are called binary operators. The binary operators used
in c++ are +, -, *, / , %, =. etc.,
7. What are ternary operators?
The operators that act upon three operands are called as ternary operators. The ternary operator
available in c++ is (?:).This operator is also referred as conditional operator.
8. What is meant by an expression?
An expression is a combination of constant, variable, operators and function calls written in any
form as per the syntax of the c++ language.

No comments:

Post a Comment