Podcast
Questions and Answers
What is the characteristic of static variables declared in function scope?
What is the characteristic of static variables declared in function scope?
- Are global variables
- Have external linkage
- Have no linkage (correct)
- Are initialized to zero by default
How are external variables defined and accessed in a C program?
How are external variables defined and accessed in a C program?
- They have no linkage and are local to a specific function
- Are stored in the stack memory for better access
- Declared outside any function and are accessible globally (correct)
- They are declared as 'static' within functions
Which section of memory stores static variables in C programs?
Which section of memory stores static variables in C programs?
- Stack memory
- Code section
- Heap memory
- Data section (correct)
What is the default initial value for external variables in C?
What is the default initial value for external variables in C?
What is the scope of extern variables in a C program?
What is the scope of extern variables in a C program?
Which type of linkage do global variables have in C programs?
Which type of linkage do global variables have in C programs?
What type of linkage does the global variable 'rateOfInt' have?
What type of linkage does the global variable 'rateOfInt' have?
Where is the global variable 'rateOfInt' stored in memory?
Where is the global variable 'rateOfInt' stored in memory?
What is the initial value of the global variable 'rateOfInt'?
What is the initial value of the global variable 'rateOfInt'?
When is the value of 'rateOfInt' accessed in the dispBal() function?
When is the value of 'rateOfInt' accessed in the dispBal() function?
Which part of the memory retains the value of 'rateOfInt' between different function calls?
Which part of the memory retains the value of 'rateOfInt' between different function calls?
What type of directive is a preprocessor directive in C programs?
What type of directive is a preprocessor directive in C programs?