Storage class of a variable determines whether the item has a global or local lifetime. In C, typedef is considered as a storage class like other storage classes (auto, register, static and extern), nevertheless the purpose of typedef is to assign alternative names to existing types.
For example, the following program compiles and runs fime
But the following program fails with compiler error.
Compiler Error: multiple storage classes in declaration specifiers
See this quiz for practice on storage class and type specifiers. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- GFact 22 | (2^x + 1 and Prime)
- GFact 23 | (Brocard’s problem)
- Interesting and Cool Tricks in Java
- How to Install and Configure MongoDB in Ubuntu?
- Interesting Facts About Perl
- 10 Interesting Facts About Computers
- Interesting Facts about DBMS
- Can C++ reference member be declared without being initialized with declaration?
- Facts and Question related to Style of writing programs in C/C++
- Dilworth's Theorem
- Storage of integer and character values in C
- Vantieghems Theorem for Primality Test
- Nesbitt's Inequality
- G-Fact 21 | Collatz Sequence
- G-Fact 20 (Cayley's formula for Number of Labelled Trees)