Which pointer require more memory space int or character pointer ? Size of Pointer Variable does not depends upon data type Pointer variable only stores the address of the variable . Address of variable is of integer type So Size of Pointers variables of any type is 2 byte Bookmark & Share
What is the size of const Pointer variable in C ?
What is the size of const Pointer variable in C ? Pointer : Pointer is the variable that stores the address of another variable . How to calculate size of Const Pointer ? Size of Const Pointer : 2 bytes For more details … Bookmark & Share
What is the size of Void Pointer variable in C ?
What is the size of Void Pointer variable in C ? Pointer : Pointer is the variable that stores the address of another variable . How to calculate size of Pointer ? Size of Void Pointer can be evaluated by using sizeof operator Pointer stores the address of the Variable . Address of variable is(…)
External ( extern ) storage class in C Programming
External ( extern ) storage class in C Programming Variables of this storage class are “Global variables” Global Variables are declared outside the function and are accessible to all functions in the program Generally , External variables are declared again in the function using keyword extern In order to Explicit declaration of variable use ‘extern’(…)
Automatic ( Auto ) storage class in C Programming
Automatic ( Auto ) storage class in C Programming This is default storage class All variables declared are of type Auto by default In order to Explicit declaration of variable use ‘auto’ keyword auto int num1 ; // Explicit Declaration Features : Storage Memory Scope Local / Block Scope Life time Exists as long as(…)
isalpha function > ctype.h > header files in c Programming
isalpha function > ctype.h > header files in c Programming Syntax int isalpha (int c) Header File ctype.h Return Value Return non-zero if character is either alphabet Return zero if character is not alphabet Live Example : void main(){char ch = ’1′; if(isalpha(ch)) printf(“nThis is alphabet character”);else printf(“nThis is non alphabet character”);} Output : This(…)
isalnum function > ctype.h > header files in c Programming
isalnum function > ctype.h > header files in c Programming Syntax int isalnum (int c) Header File ctype.h Return Value Return non-zero if letter is either alphabet or digit Return zero if character is not alphanumeric Live Example : void main(){char ch = ’1′;if(isalnum(ch)) printf(“nThis is alpha-numeric character”);else printf(“nThis is non alpha-numeric character”);} Output : (…)
Disadvantages of File scope / Global Variable in C Programming
Disadvantages of File scope / Global Variable in C Programming Definition : Variable is said to have global scope / file scope if it is defined outside the function and whose visibility is entire program Disadvantages of Global Variables : Too many variables , if declared as global , then they remain in the memory(…)
Advantages of File scope / Global Variable in C Programming
Advantages of File scope / Global Variable in C Programming Definition : Variable is said to have global scope / file scope if it is defined outside the function and whose visibility is entire program Advantages of Global Variables : If some common data needed to all functions can be declared as global to avoid(…)
Disadvantages of Block scope / Local Variable in C Programming
Disadvantages of Block scope / Local Variable in C Programming Definition :Variable is said to have local scope / block scope if it is defined within function or local block Disadvantages of Local Variables : [crosslist] Common data required to pass again and again . They have Limited scope [/crosslist]