Best Answer

In C, "typedef" is a storage class, but sort of a weird one. It specifies that you are not actually creating an object, but merely defining a type. As such, there is nothing to be stored (at runtime). The other storage classes, auto, extern, register, and static, all specify actual storage.

User Avatar

Wiki User

โˆ™ 2007-12-13 10:19:08
This answer is:
User Avatar
Study guides
See all Study Guides
Create a Study Guide

Add your answer:

Earn +20 pts
Q: Do you specify a storage class with typedef?
Write your answer...
Related questions

What is the storage class specifiers?

auto, extern, static, register, typedef (only formally)

What is storage claases in c language?

They is static, auto, extern and typedef. (Well, typedef aint't an actual storage class, it means type-definition.)

What is different storage class in c?

Different from what? Storage classes are auto, register, static, extern and typedef (formally).

What is meant by the storage class of a variable?

one of these: static, extern, auto, register, typedef (just formally!)

How do we represent typedef in enterprise architect tool?

create class with typedef construct.and then add the base class with the name type

Storage classes available in c language?

Storage classes are auto, register, static, extern and typedef (formally only).

What is difference between static storage class and extern storage class and auto storage class and register storage class in c language?

Basically storage class defines the accessibity of a variable. If you specify a variable with auto storage class, then that variable can be accessed only in that function or block where it is declared. if you specify a variable with static storage class, it has the same visibily like an auto variable but it can retains it's value between function calls where as an auto variable cannot. look at this example: void main() { int i,j ; for(j = 0; j< =2; j++) { i = fun1(); printf("%d",i); } } int fun1() { static int k =0; k = k+1; return k; } it prints 1 2 3

What are the modofier in turbo C?

You can use every standard C modifier in TurboC: long, short, signed, unsigned; and every storage class as well: static, extern, auto, register, typedef.

What is storage qualifiers in c?

static, extern, auto, register (and typedef, but only formally)

What is storage class Define storage class with the help of example?

the storage class is define as 10th class and 9th class and the examples are 10b and 9a

Storage class of c language with suitable examples?

There are four types of storage class or variable in c. 1) auto storage class. 2) register storage class. 3) static storage class. 4) external storage class.

What is typedef in C?

AnswerA typedef declaration lets you define your own identifiers that can be used in place of type specifiers such as int, float, and double. A typedef declaration does not reserve storage. The names you define using typedef are not new data types, but synonyms for the data types or combinations of data types they represent. The name space for a typedef name is the same as other identifiers. The exception to this rule is if the typedef name specifies a variably modified type. In this case, it has block scope.When an object is defined using a typedef identifier, the properties of the defined object are exactly the same as if the object were defined by explicitly listing the data type associated with the identifier.Examples of typedef DeclarationsThe following statements declare LENGTH as a synonym for int and then use this typedef to declare length, width, and height as integer variables:typedef int LENGTH;LENGTH length, width, height;The following declarations are equivalent to the above declaration:int length, width, height;Similarly, typedef can be used to define a class type (structure, union, or C++ class). For example:typedef struct { int scruples;int drams;int grains;} WEIGHT;The structure WEIGHT can then be used in the following declarations:WEIGHT chicken, cow, horse, whale;In the following example, the type of yds is "pointer to function with no parameter specified, returning int".typedef int SCROLL();extern SCROLL *yds;In the following typedefs, the token struct is part of the type name: the type of ex1 is struct a; the type of ex2 is struct b.typedef struct a { char x; } ex1, *ptr1;typedef struct b { char x; } ex2, *ptr2;Type ex1 is compatible with the type struct a and the type of the object pointed to by ptr1. Type ex1 is not compatible with char, ex2, or struct b.C++ The remainder of this section pertains to C++ only.In C++, a typedef name must be different from any class type name declared within the same scope. If the typedef name is the same as a class type name, it can only be so if that typedef is a synonym of the class name. This condition is not the same as in C. The following can be found in standard C headers:typedef class C { /* data and behavior */ } C;A C++ class defined in a typedef without being named is given a dummy name and the typedef name for linkage. Such a class cannot have constructors or destructors. For example:typedef class { Trees(); } Trees;Here the function Trees() is an ordinary member function of a class whose type name is unspecified. In the above example, Trees is an alias for the unnamed class, not the class type name itself, so Trees() cannot be a constructor for that class.External Links:You can find more questions with answers for C typedef from http:/

What is extern storage class in c?

Extern is not storage class.

What is typedef in c programming language?

A typedef is a type definition.

What are different storage class in c?

the differente storage classices is auto,extern,register,and static storage class

What is the by default storage class of any variable in c?

automatic storage class

Typedef int a a a Is this possible in C?

No, but 'typedef int a;' is possible, it defines the type 'a'.

Explain the different access storage specifiers available in c?

The storage class specifiers in C and C++ are:autoexternmutableregisterstatictypedefA storage class specifier is used to refine the declaration of a variable, a function, and parameters

What is the function of typedef statement?

typedef is used to create user defined data types

What is the advantages of storage class in c?

advantage of storage classes

What is the default value of register storage class?

Nothing, random value, unless you initialize the variable explicitly.Note: 'register' is not a storage class, it's only a modifier for 'auto' storage class.

What is the use of type def in c?

A typedef is used to define a type. The clue is in the name: typedef = type definition.

In bits before subnetting how large is the host portion in a Class A network?

In a class A network, the first 8 bits specify the network, the remaining 24 bits specify the host.

What are the Uses of typedef?

the purpose of typedef is to redefine the name of an existing variable type. e.g. typedef unsigned long int T; T v1,v2;

Why inline functions shall not be defined with extern or static storage class?

inline itself should be considered as a storage class