the storage class registerthe storage class


The Storage Class register

The Storage Class register : The storage class 'register' tells the compiler that the associated variable  should  be stored  in  high-speed  memory registers,  provided  it  is physically  and semantically  possible  to  do  so.  This  storage  class  defaults  to  automatic  whenever  the compiler cannot allocate an appropriate physical register. Basically, the use of storage class 'register'  is an attempt to improve execution speed. An example id

void main()

{  register int i; Statements;

}

If a storage class is specified in a declaration and the type is absent, then the type is 'int' by default.

The declaration

register i; is equivalent to register int i;

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: the storage class registerthe storage class
Reference No:- TGS0305418

Expected delivery within 24 Hours