What is the scope of a local variable defined inside a function in C?
- Global scope
- Limited to the block
- Limited to the function
- No scope
In C, a local variable defined inside a function has scope limited to that specific function. It cannot be accessed from outside the function.
Loading...
Related Quiz
- You are working on an application that requires fast data retrieval times. What method of file access would be most suitable?
- You're developing a text editor and need to implement a search feature. Which function could be useful to check if a certain word exists in a text?
- You're working on a C program that needs to manipulate and process data about a list of products in a store. Each product has several attributes like name, price, and quantity. What approach would you take to store and process this data efficiently?
- How can command line arguments be used to influence the flow of a program at runtime?
- How can you open a file for both reading and writing in C?