I have this question. List Lg is a global variable and L1 is a local variable.I have not yet described my list/array. Am made to understand that Lg should have my initial length so that I can later compare with L1. My Q is how do I declare Lg and L1 in the main function,what is the main function(is it the header file?)and what is its purpose.

I assume the main function is that one called main() - which is the entry point of your program

If a variable is global, that means its declared outside of any functions. (the terms "local" and "global" refer to where in your program that variable is declared. the syntax for declaring the variable is otherwise the same)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.