Question-11. Explain the purpose of the function sprintf() ?

Answer- Prints the formatted output onto the character array.

 

Question-12. What is the meaning of base address of the array ?

Answer- The starting address of the array is called as the base address of the array.

 

Question-13. When should we use the register storage specifier ?

Answer- If a variable is used most frequently then it should be declared using register storage specifier, then possibly the compiler gives CPU register for its storage to speed up the look up of the variable.

S++ or S = S+1, which can be recommended to increment the value by 1 and why?
S++, as it is single machine instruction (INC) internally.

 

Question-14. What is a dangling pointer ?

Answer- A pointer initially holding valid address, but later the held address is released or freed. Then such a pointer is called as dangling pointer.

 

Question-15. What is the purpose of the keyword typedef ?

Answer- It is used to alias the existing type. Also used to simplify the complex declaration of the type.

 

Question-16. What is lvalue and rvalue ?

Answer- The expression appearing on right side of the assignment operator is called as rvalue. Rvalue is assigned to lvalue, which appears on left side of the assignment operator. The lvalue should designate to a variable not a constant.

 

Question-17. What is the difference between actual and formal parameters ?

Answer- The parameters sent to the function at calling end are called as actual parameters while at the receiving of the function definition called as formal parameters.

 

Question-18. Can a program be compiled without main() function ?

Answer- Yes, it can be but cannot be executed, as the execution requires main() function definition.

 

Question-19. What is the advantage of declaring void pointers ?

Answer- When we do not know what type of the memory address the pointer variable is going to hold, then we declare a void pointer for such.

 

Question-20. Where an automatic variable is stored ?

Answer- Every local variable by default being an auto variable is stored in stack memory.