C Programming and Technical

Q. Tell any five properties of auto variables?
A. Auto variables are defined inside a function. A variable declared inside the function without storage class name is, by default, an auto variable. These functions are declared on the stack. The stack provides temporary storage

Read Solution (Total 0)

C Other Question

Q. Four type of scope in c:

A. Block scope.
Function scope.
File scope.
Program scope
Q. What is automatic type promotion in c?

A. In c if two operands are of different data type in a binary operation then before performing any operation compiler will automatically convert the operand of lower data type to higher data type. This phenomenon is known as automatic type conversion.

For example:
int a=10,c;
float b=5.5f;
c=a+b;
Here a int variable while b is float variable. So before performing addition operation value of the variable a (Lower data type) will automatically convert into float constant (higher data type) then
it will perform addition operation.