Storage class of a variable refers to the type of memory allocated to a variable. For example int num = 10; /* num, an integer is allocated the automatic memory */ There are four types of storage classes viz. automatic, registers, static and global or extern. Variables which are declared inside the blocks, inside the…