- 44 Question : – What do you mean by Reserve Keyword?
- 45 Question : – Explain Unary minus (-) operator in C Language.
- 46 Question : – Explain Address of Operator (&) C Language.
- 47 Question : – Advantages of Library Functions in C Language.
- 48 Question : – What do you mean by Conditional Operator.
- 49 Question : – Discuss the various Logical Operators.
- 50 Question : – Discuss the Relational Operators.
44 Question : – What do you mean by Reserve Keyword?
Keywords are the reserved words that have standard, predefined meaning in C Language i.e. the words whose meaning has already been defined to C compiler are called keywords. We should not have to use keywords to construct variable names because it will create confusion as well as we can’t assign new meanings to the keywords.
45 Question : – Explain Unary minus (-) operator in C Language.
In the operators a minus sign is preceding a numeric constant, variable or expression. In C, all numeric constants are positive thus a negative number is actually an expression, consisting of the unary minus operator followed by a positive numeric constant. Unary minus operation is different from the arithmetic minus operator which denotes subtraction (-).
46 Question : – Explain Address of Operator (&) C Language.
The address of (&) operator, when prefixed with a variable, return the address of the memory location where variable is stored. It is used in the scanf() function and to initialize the pointers. The address of x memory location can be determined by &x, where & is unary operator called address of operator, which evaluates the address of its operand.
e.g. Suppose the address of x is assigned to another variable
y = &x
The new variable is called a pointer to x, because it points to the location where x is stored in memory. As y represent x’s address but not its value, so y is known to as a pointer variable.
47 Question : – Advantages of Library Functions in C Language.
- Reusability of Code: – The Program development activity requires three major activities: coding, testing, and debugging. If a function developed previously by self or some body else, is available as a standard library function then the effort of redevelopment can be avoided.
- Faster Development: – Since many useful functions are available to the programmer, the program development process becomes faster and the productivity increases.
48 Question : – What do you mean by Conditional Operator.
The conditional operator ? and : are sometimes called ternary operators. Since they take three arguments. The Conditional or ternary operator is used to carry out operation under certain conditions. It short-hand version of if-else statement. These operators are used instead of block if statement. The general syntax is given below:
expression1 ? expression2 : expression3;
if expression1 is true then expression2 will be executed if expression is false then expression3 will be executed.
49 Question : – Discuss the various Logical Operators.
Logical operators are the operators which are used to connect relational expressions or logical expressions. The result of such operations is always logical i.e. either true (1) or false (0). The valid logical operators supported by C are.
Operator | Operations | Example | Precedence |
---|---|---|---|
! | Logical Not or Negation | !x | Highest |
&& | Logical AND or Conjunction | x&&y | Intermediate |
|| | Logical OR or Disjunction | x||y | Lowest |
50 Question : – Discuss the Relational Operators.
A relational operator is an operator which is used to compare two values of the operands and the result of such as an operation is always logical i.e. either true (1) or false (0). Relational Operators are mainly used in Decision Making Statements. And also the Expression with relational Operators are known as relational expressions. The valid relational operators are known as relational expressions.
Operator | Operations | Example | Precedence |
---|---|---|---|
> | greater than | x>y | Highest |
>= | greater than or equal to | x>=y | Highest |
< | less than | x<y | Highest |
<= | less than or equal to | x<=y | Highest |
== | equal to | x==y | Lowest |
!= | not equal to | x!=y | Lowest |