Pointer Basics in C Language part-1


O LEVEL -PAPER 3rD -- M3-R4


C  LANGUAGE



OBJECTIVES


POINTER BASICS

EXTENDED CONCEPT OF POINTER

POINTER'S ARITHMETIC

APPLICATION OF POINTER




POINTER BASICS







Here dos base architect give only 16byte memory space to our program therefore our memory range between 0 to 65535.


&=ADDRESS OF OPERATOR





*=INDIRECTION OPERATOR






EXAMPLE : --




NOTE :-- In above example 1st printf() print the value of x i.e 5 and 2nd printf() print 
                 address of x i.e 2048(2048 assumed value ) and 3rd printf() print x value i.e 5                                 because when '*&' come together then it's cancel each other so '*& 'means 
                 simply x. Remember while printing address of variable we always use %u instead
                of %d because of memory range that %u give exact value of memory address as
               compare of %d. for example --
                 





SOME POINT TO REMEMBER :--







Here x is declared as ordinary variable but j store with *j to indicate compiler that it's a special 
variable in which only address can store.

DEFINATION OF POINTER





EXAMPLE :--




BASE ADDRESS 




Here In above point to remember that we store only that data type variable in memory in which its declared and base address means address of variable i.e 'a' has base address of 1000 and 1001 but we consider only 1000 as base address.



IF THIS ARTICLE IS HELPFUL TO YOU OR YOU HAVE ANY QUERY THEN PLEASE SHARE AND COMMENTS.


Comments

Popular posts from this blog

Important Announcements(download all my book free)

O LEVEL- INTERNET TECHNOLOGY & WEB DESIGN

Call by Reference with Pointer in C Language part-4-a