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

SBI Clerk Mains 2026 Full Mock Test-01

languageIcon English
  • pdpQsnIcon190 Questions
  • pdpsheetsIcon200 Marks
  • timerIcon160 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Mains MBT (29th October 2026 S1)- Based on Backlog Vacancies

languageIcon English
  • pdpQsnIcon190 Questions
  • pdpsheetsIcon200 Marks
  • timerIcon160 Mins
languageIcon English
Free
Must Attempt

SBI Clerk Mains 2026 : Reasoning Section Test - 01

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon60 Marks
  • timerIcon45 Mins
languageIcon English
test-prime-package

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

  • 1.5 Lakhs+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
592k+ students have already unlocked exclusive benefits with Test Prime!
test-prime-package

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

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