C Programming Question and Answers
57. | Suppose a global variable and local variable have the same name. Is it is possible to access a global variable from a block where local variables is defined? |
---|---|
No. It is not possible in C. It is always the most local variable that gets preference. | |
58. | What are linked lists? |
---|---|
A linked list is composed of nodes that are connected with another. In C programming linked lists are created using pointers. Using linked lists is one efficient way of utilizing memory for storage. | |
59. | What is stack? |
---|---|
A stack is one form of data structure. Data is stored in stacks using the FILO (First In Last Out) approach. At any particular instance, only the top of the stack is accessible. Which means that in order to retrieve data that is stored inside the stack, those on the upper part should be extracted first. Storing data in a stack is also referred to as a PUSH, while data retrieval is referred to as a POP. | |
60. | What is a nested loop? |
---|---|
A nested loop is a loop that runs within another loop. Put it in another sense, you have an inner loop that is inside an outer loop. In this scenario, the inner loop performed a number of times as specified by the outer loop. For each turn on the outer loop, the inner loop is first performed. | |