arrow
arrow
arrow
Which of the following storage classes in C ensures that the variable is stored in memory only once and has internal linkage?
Question



Which of the following storage classes in C ensures that the variable is stored in memory only once and has internal linkage?

A.

auto

B.

register

C.

static

D.

extern

E.

typedef

Correct option is C

In C, the static storage class ensures that the variable is stored in memory only once and retains its value across multiple function calls. Static variables have internal linkage by default, meaning they are accessible only within the file in which they are declared.
Important Key Points:
1. Static variables are initialized only once and maintain their value between function calls.
2. Internal linkage ensures that the variable is restricted to the file it is declared in, preventing access from other files.
3. Example of a static variable:

Knowledge Booster:
· auto: Default storage class for local variables. It has automatic duration and block scope, but no internal linkage.
· register: Suggests that the variable be stored in a CPU register for faster access. It has no linkage and is local to the block.
· extern: Used to declare global variables accessible across multiple files. It provides external linkage.
· typedef: Not a storage class but a keyword used to create type aliases, e.g., typedef unsigned int uint;.

Free Tests

Free
Must Attempt
Video Solutions

RBI Assistant Pre 2026 Full Mock Test -01

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Asst Prelims 2026 : Reasoning Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Office Attendant 2026 Full Mock Test - 01

languageIcon English
  • pdpQsnIcon120 Questions
  • pdpsheetsIcon120 Marks
  • timerIcon90 Mins
languageIcon English
test-prime-package

Access ‘SEBI Grade-A Assistant Manager’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
354k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow