History of C Programming Language

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is the default initial value of an automatic integral variable?

  • 1
  • 0 (correct)
  • null
  • garbage

Which storage class allows variables to retain their value between multiple function calls?

  • Automatic
  • External
  • Static (correct)
  • Register

What is a limitation of using the register keyword in C?

  • Register variables cannot store pointers (correct)
  • Register variables cannot be initialized
  • & operator cannot be used with register variables
  • Register variables are slower than automatic variables

In C, where is the visibility of a static global variable restricted to?

<p>The file it is declared in (C)</p> Signup and view all the answers

What does the 'extern' storage class indicate to the compiler?

<p>Variable has external linkage (A)</p> Signup and view all the answers

What happens when you attempt to dereference a register variable in C?

<p>Compilation error occurs (D)</p> Signup and view all the answers

How many times can an external variable be initialized in C?

<p>Only once globally (C)</p> Signup and view all the answers

Which type of variables have faster access time than automatic variables?

<p>'register' variables (D)</p> Signup and view all the answers

'static' keyword in C is used to define which type of variables?

<p>'static' variables (C)</p> Signup and view all the answers

In C, what can't be done to a static variable once it's declared?

<p>Declare the same variable name again (D)</p> Signup and view all the answers

Flashcards are hidden until you start studying

More Like This

Use Quizgecko on...
Browser
Browser