What are Storage Classes in C ?

Answer Posted / shashi sourabh kant

There are four type of storage classes in C. These are used
to store variables. These are Extern, Static, Register and
Auto. Auto is the default class assigned to any variable.
eg. if we define int x=10; then it means auto int x=10
register and static differ in only one grounds that
register is there in the cpu and static in the main memory.
extern is global and can be accessed by any program and
anywhere.

Is This Answer Correct ?    704 Yes 59 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I need testPalindrome and removeSpace #include #define SIZE 256 /* function prototype */ /* test if the chars in the range of [left, right] of array is a palindrome */ int testPalindrome( char array[], int left, int right ); /* remove the space in the src array and copy it over to the "copy" array */ /* set the number of chars in the "copy" array to the location that cnt points t */ void removeSpace(char src[], char copy[], int *cnt); int main( void ) { char c; /* temporarily holds keyboard input */ char string[ SIZE ]; /* original string */ char copy[ SIZE ]; /* copy of string without spaces */ int count = 0; /* length of string */ int copyCount; /* length of copy */ printf( "Enter a sentence:\n" ); /* get sentence to test from user */ while ( ( c = getchar() ) != '\n' && count < SIZE ) { string[ count++ ] = c; } /* end while */ string[ count ] = '\0'; /* terminate string */ /* make a copy of string without spaces */ removeSpace(string, copy, ©Count); /* print whether or not the sentence is a palindrome */ if ( testPalindrome( copy, 0, copyCount - 1 ) ) { printf( "\"%s\" is a palindrome\n", string ); } /* end if */ else { printf( "\"%s\" is not a palindrome\n", string ); } /* end else */ return 0; /* indicate successful termination */ } /* end main */ void removeSpace(char src[], char copy[], int *cnt) { } int testPalindrome( char array[], int left, int right ) { }

2195


How can I call a function with an argument list built up at run time?

621


what are enumerations in C

708


What is c method?

520


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

2518






What are header files in c programming?

643


What is a global variable in c?

581


how to find anagram without using string functions using only loops in c programming

2704


Explain what is a const pointer?

624


What is the use of bitwise operator?

676


Explain what is page thrashing?

597


Why is not a pointer null after calling free?

579


What are the differences between new and malloc in C?

595


Is it possible to have a function as a parameter in another function?

588


How can I sort a linked list?

626