Electrical Engineering (EE) Exam  >  Electrical Engineering (EE) Questions  >  Which of the following is not a storage class... Start Learning for Free
Which of the following is not a storage class specifier in C?
  • a)
    volatile
  • b)
    extern
  • c)
    typedef
  • d)
    static
Correct answer is option 'A'. Can you explain this answer?
Most Upvoted Answer
Which of the following is not a storage class specifier in C?a)volatil...
Explanation:

In the C programming language, storage class specifiers are used to define the scope, visibility, and lifetime of variables. There are four storage class specifiers in C: `auto`, `register`, `static`, and `extern`.

1. `volatile`:
The `volatile` storage class specifier is not a part of the list of storage class specifiers in C. Instead, `volatile` is a type qualifier that indicates that a variable's value can be changed unexpectedly by external factors, such as hardware or interrupts. It tells the compiler not to optimize the variable and always read from or write to it in memory.

2. `extern`:
The `extern` storage class specifier is used to declare a variable that is defined in another source file or library. It is used to provide a declaration without allocating storage space for the variable. The actual definition of the variable is located in another file, and the `extern` declaration allows the program to access it.

3. `typedef`:
The `typedef` storage class specifier is used to create a new name for an existing data type. It allows the programmer to create aliases or alternative names for types already defined. It is commonly used to make code more readable and maintainable.

4. `static`:
The `static` storage class specifier is used to declare variables that are local to a block, function, or file. When a variable is declared as `static`, it retains its value between function calls and has a lifetime equal to the entire duration of the program. Additionally, `static` variables are only visible within the scope they are defined in, making them useful for maintaining state information.

Therefore, the correct answer is option 'A', `volatile`, as it is not a storage class specifier but a type qualifier in C.
Free Test
Community Answer
Which of the following is not a storage class specifier in C?a)volatil...
The volatile keyword is not a storage class specifier in C.
The storage class specifiers in C are:
  • extern: It declares a variable or function that is defined in another source file or library. It is used to indicate that the variable or function has external linkage.
  • typedef: It is used to create a new name (alias) for a data type.
  • static: It is used to declare a variable or function that has static duration. A static variable retains its value between function calls, and a static function can only be called within the same source file where it is defined.
The volatile keyword, although not a storage class specifier, is used to indicate that a variable can be modified by external factors that are beyond the control of the program. It tells the compiler to always read/write the variable from/to memory, even if it appears that the value doesn't change during program execution. This is typically used when working with hardware registers, interrupt handlers, or multi-threaded environments where the variable's value can be changed by external factors.
Explore Courses for Electrical Engineering (EE) exam

Top Courses for Electrical Engineering (EE)

Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer?
Question Description
Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer? for Electrical Engineering (EE) 2024 is part of Electrical Engineering (EE) preparation. The Question and answers have been prepared according to the Electrical Engineering (EE) exam syllabus. Information about Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer? covers all topics & solutions for Electrical Engineering (EE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer?.
Solutions for Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer? in English & in Hindi are available as part of our courses for Electrical Engineering (EE). Download more important topics, notes, lectures and mock test series for Electrical Engineering (EE) Exam by signing up for free.
Here you can find the meaning of Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer?, a detailed solution for Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer? has been provided alongside types of Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Which of the following is not a storage class specifier in C?a)volatileb)externc)typedefd)staticCorrect answer is option 'A'. Can you explain this answer? tests, examples and also practice Electrical Engineering (EE) tests.
Explore Courses for Electrical Engineering (EE) exam

Top Courses for Electrical Engineering (EE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev