OpenTechBook
  • Home
  • Open Books
    • All Open Books

    • Free eBooks
    • Free Magazines
    • Free Journals

    • Submit an Open Book
  • Quizzes
Home » Quiz » C++ Quiz

Global variables, when declared outside all functions, have ______ storage duration by default.

Difficulty level
  • auto
  • extern
  • static
  • volatile
When global variables are declared outside all functions, they have static storage duration by default. Static storage duration means they exist for the entire program's lifetime.
Add your answer
Loading...
Facebook Twitter Linkedin Reddit Pinterest
C++ Quiz
Quiz
Lisa wants to check the day of the week and execute different code for each day. Which control structure would be the most appropriate for her use?
Using too many inline functions can lead to ______ bloat.

Related Quiz

  • Which function is used to get the position of the file pointer in a file? 
  • What is the primary purpose of using enum in C++? 
  • Which parameter-passing method does not allow the function to modify the actual argument? 
  • Why is the use of the "using namespace std;" directive common in C++ programs?
  • Which type of loop is best suited when the number of iterations is known ahead of time? 

Leave a commentCancel

Your email address will not be published. Required fields are marked *

Hot Quiz

PHP QuizMachine Learning QuizReact.js QuizCyber Security QuizPython QuizNode.js QuizASP.NET Core QuizData Science Statistics QuizCSS QuizADO.NET QuizCheckpoint QuizServlet QuizData Modelling QuizAPI Testing QuizDatabase Testing QuizBootstrap QuizAlgorithm QuizComputer Science QuizCommvault QuizJCL Quiz
Copyright © 2025 Open Tech Book
  • About
  • Contact
  • FAQ
  • DMCA
  • Disclaimer
  • Privacy Policy