Q:
WHAT IS THE SIZE OF INT POINTER AND CHAR POINTER IN C?
belongs to collection: C INTERVIEW QUESTIONS AND ANSWERS
C INTERVIEW QUESTIONS AND ANSWERS
- WHAT IS C LANGUAGE?
- WHO DEVELOPED C LANGUAGE?
- DESCRIBE ABOUT HISTORY OF C PROGRAMMING LANGUAGE
- WHERE IS C PROGRAMMING LANGUAGE USED OR USES OF C LANGUAGE?
- WHAT IS THE DIFFERENCE BETWEEN C AND C++?
- WHAT IS THE DIFFERENCE BETWEEN TOP DOWN APPROACH AND BOTTOM UP APPROACH IN PROGRAMMING LANGUAGES?
- WHAT IS THE DIFFERENCE BETWEEN C AND JAVA?
- C LANGUAGE HAS BEEN DEVELOPED IN WHICH LANGUAGE?
- WHICH YEAR C LANGUAGE IS DEVELOPED?
- WHAT IS MEANT BY PROGRAMMING LANGUAGE AND GIVE SOME EXAMPLES?
- DESCRIBE ABOUT C STANDARDS
- WHAT ARE THE KEY FEATURES OR CHARACTERISTICS OF C LANGUAGE?
- WHAT IS EMBEDDED C?
- WHICH LEVEL IS C LANGUAGE BELONGING TO?
- WHAT DO YOU MEAN BY HIGH LEVEL, MIDDLE LEVEL AND LOW LEVEL LANGUAGES AND GIVE AN EXAMPLE FOR EACH?
- WHAT IS THE DIFFERENCE BETWEEN STRUCTURED ORIENTED, OBJECT ORIENTED AND NON-STRUCTURE ORIENTED PROGRAMMING LANGUAGE?
- WHAT IS COMPILER?
- WHAT IS THE DIFFERENCE BETWEEN ASSEMBLER, COMPILER AND INTERPRETER?
- WHAT IS PRINTF()?
- WHAT IS SCANF()?
- WHAT IS MEANT BY PROTOCOL?
- EXECUTION OF A C PROGRAM STARTS FROM WHICH FUNCTION?
- WHAT ARE ALL THE SECTIONS THAT A C PROGRAM MAY/MUST HAVE?
- WHAT IS IDE?
- LIST OUT SOME OF C COMPILERS
- WHAT IS HEADER FILE IN C LANGUAGE?
- IS C LANGUAGE CASE SENSITIVE?
- WHAT IS MACRO? WHY DO WE USE MACRO?
- WHAT IS DATA TYPE IN C?
- WHAT IS THE DIFFERENCE BETWEEN INT, CHAR, FLOAT & DOUBLE DATA TYPES?
- WHAT IS THE USE OF SIZEOF() FUNCTION IN C?
- WHAT IS MODIFIER IN C?
- WHAT ARE DIFFERENT TYPES OF MODIFIERS IN C?
- WHAT IS ENUM IN C?
- WHAT IS VOID IN C?
- WHAT IS TOKEN IN C?
- WHAT ARE THE TYPES OF C TOKENS?
- WHAT IS IDENTIFIER IN C?
- WHAT IS KEYWORD IN C?
- LIST OUT SOME KEYWORDS AVAILABLE IN C LANGUAGE
- WHAT IS CONSTANT IN C?
- WHAT ARE THE TYPES OF CONSTANTS IN C?
- WHAT IS VARIABLE IN C?
- WHAT IS THE DIFFERENCE BETWEEN CONSTANT AND VARIABLE IN C?
- CAN VARIABLE NAME START WITH NUMBERS?
- WHAT IS THE DIFFERENCE BETWEEN VARIABLE DECLARATION AND VARIABLE DEFINITION IN C?
- WHAT ARE THE DIFFERENT TYPES OF VARIABLE IN C?
- WHAT IS LOCAL VARIABLE IN C?
- WHAT IS GLOBAL VARIABLE IN C?
- WHAT IS ENVIRONMENT VARIABLE IN C?
- WHAT IS OPERATOR IN C?
- WHAT ARE THE DIFFERENT TYPES OF OPERATORS IN C?
- WHAT IS THE SYNTAX FOR TERNARY OPERATOR IN C?
- WHAT IS ARITHMETIC OPERATOR IN C?
- WHAT IS ASSIGNMENT OPERATOR IN C?
- WHAT IS THE RELATIONAL OPERATOR IN C?
- WHAT IS THE LOGICAL OPERATOR IN C?
- WHAT IS BITWISE OPERATOR IN C?
- WHAT ARE ALL DECISION CONTROL STATEMENTS IN C?
- WHAT ARE ALL LOOP CONTROL STATEMENTS IN C?
- WHAT IS THE DIFFERENCE BETWEEN WHILE AND DO-WHILE LOOPS IN C?
- WHAT IS THE DIFFERENCE BETWEEN SINGLE EQUAL “=” AND DOUBLE EQUAL “==” OPERATORS IN C?
- WHAT IS THE DIFFERENCE BETWEEN PRE INCREMENT OPERATOR AND POST INCREMENT OPERATOR IN C?
- WHAT IS THE DIFFERENCE BETWEEN PRE DECREMENT OPERATOR AND POST DECREMENT OPERATOR?
- WHAT IS “&” AND “*” OPERATORS IN C?
- WHAT WILL HAPPEN IF BREAK STATEMENT IS NOT USED IN SWITCH CASE IN C?
- WHY IS DEFAULT STATEMENT USED IN SWITCH CASE IN C?
- WHAT IS THE USE OF “GOTO” STATEMENT?
- WHAT VALUE IS ASSIGNED TO THE BELOW VARIABLES?
- WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND REGISTER VARIABLE IN C?
- WHAT IS THE DIFFERENCE BETWEEN AUTO VARIABLE AND STATIC VARIABLE IN C?
- WHERE SHOULD TYPE CAST FUNCTION NOT BE USED IN C?
- HOW MANY ARGUMENTS CAN BE PASSED TO A FUNCTION IN C?
- WHAT IS STATIC FUNCTION IN C?
- IF YOU WANT TO EXECUTE C PROGRAM EVEN AFTER MAIN FUNCTION IS TERMINATED, WHICH FUNCTION CAN BE USED?
- WHAT IS EXIT() FUNCTION IN C?
- WHAT IS THE DIFFERENCE BETWEEN EXIT() AND RETURN() IN C?
- WHAT IS THE USE OF “#DEFINE” IN C?
- WHAT IS THE SYNTAX FOR COMMENTS IN C?
- HOW WILL YOU OVERRIDE AN EXISTING MACRO IN C?
- HOW TO CHECK WHETHER MACRO IS DEFINED OR NOT IN A C PROGRAM?
- WHAT IS THE DIFFERENCE BETWEEN MEMCPY() & STRCPY() FUNCTIONS IN C?
- WHAT IS THE DIFFERENCE BETWEEN MEMCPY() & MEMMOVE() FUNCTIONS IN C?
- IS THERE ANY INBUILT LIBRARY FUNCTION IN C TO REMOVE LEADING AND TRAILING SPACES FROM A STRING? HOW WILL YOU REMOVE THEM IN C?
- WHAT IS THE DIFFERENCE BETWEEN STRCPY() & STRNCPY() FUNCTIONS IN C?
- CAN ARRAY SUBSCRIPTS HAVE NEGATIVE VALUE IN C?
- WHAT IS THE DIFFERENCE BETWEEN ARRAY AND STRING IN C?
- WHAT IS POINTER IN C?
- WHAT IS NULL POINTER IN C?
- WHAT IS NULL IN C?
- WHAT IS VOID POINTER IN C?
- WHAT IS DANGLING POINTER IN C?
- WHAT IS WILD POINTER IN C?
- WHAT IS FILE POINTER IN C?
- WHEN CAN VOID POINTER AND NULL POINTER BE USED IN C?
- WHAT IS CONST POINTER IN C?
- IS POINTER ARITHMETIC A VALID ONE? WHICH ARITHMETIC OPERATION IS NOT VALID IN POINTER? WHY?
- IS VOID POINTER ARITHMETIC A VALID ONE? WHY?
- WHAT IS THE DIFFERENCE BETWEEN NULL AND ZERO?
- WHAT IS THE DIFFERENCE BETWEEN NULL POINTER AND UNINITIALIZED POINTER IN C?
- CAN ARRAY SIZE BE DECLARED AT RUN TIME?
- WHAT IS MEMORY LEAK IN C?
- WHAT HAPPENS WHEN WE TRY TO ACCESS NULL POINTER IN C?
- WHAT IS MEANT BY SEGMENTATION FAULT OR MEMORY FAULT IN C?
- WHAT IS MEANT BY CORE DUMP IN C?
- CAN A POINTER BE FREED MORE THAN ONCE IN C? WHAT HAPPENS IF DO SO? OR CAN A POINTER BE FREED TWICE IN C?
- WHAT IS THE SIZE OF INT POINTER AND CHAR POINTER IN C?
- HOW WILL YOU PRINT THE VALUE AND ADDRESS OF A POINTER VARIABLE (EXAMPLE INT *P) IN C?
- HOW WILL YOU PRINT THE VALUE AND ADDRESS OF A NORMAL VARIABLE IN (EXAMPLE INT P) C?
- WHAT ARE LIBRARY FUNCTIONS AND THEIR USE IN C LANGUAGE? CAN WE WRITE OUR OWN FUNCTIONS AND INCLUDE THEM IN C LIBRARY?
- CAN VARIABLE NAME BE START WITH UNDERSCORE IN C?
- CAN VARIABLE NAME HAVE SPECIAL SYMBOLS IN C?
- WHAT IS INLINE FUNCTION IN C?
- IS IT POSSIBLE TO PRINT “HELLO WORLD” WITHOUT SEMICOLON IN C? HOW?
- WHAT IS THE SCOPE OF LOCAL, GLOBAL AND ENVIRONMENT VARIABLES IN C?
- WHY ARE WE USING POINTERS IN C?
- WHAT IS STATIC VARIABLE IN C?
- WHAT IS EXTERN AND STATIC FUNCTION IN C?
- WHAT IS THE DIFFERENCE BETWEEN POINTER AND ARRAY IN C?
- WHAT IS THE USE OF MAIN() FUNCTION IN C?
Pointer variable size is not depending on data type as pointer always stores the address of other variable which is always integer data type.
So, any pointer (int, char, double, etc) size will be 2 for 16 bit processor, 4 for 32 bit processor and 8 for 64 bit processor.
sizeof() operator can be used to evaluate size of a variable/pointer in C.
need an explanation for this answer? contact us directly to get an explanation for this answer