Thursday 25 August 2011

I said .... why you add parenthesis after function name ....


when we use any function generally we add parenthesis in front of it . when i ask this question to my  friend he reply " hey idiot , you dont know this easy thing "
i said can you please explain this , he said that  generally we use parenthesis for adding or supplying data to it .

I said to him , hey stop your bocus theory , now listen , if we say that we use parenthesis to any thing means it is a advantage of this thing
 ... now take another term ...
if i say that i am not supplying any data to it , than remove this parenthesis from it . then he reply that this is a syntax of it . now i am little bit agree with him

but listen to me .... and follow this url (http://javadrinks.blogspot.com/2011/08/call-c-function-without-its-name.html)every thing in memory is in form of address and divided into segements .... so ( ) is only used for fetching its segment and function_name is used for fetching its address from memory so ( ) is used for entering into function segment . 

Call a ' C ' function without its name


Sunday 14 August 2011

what is the meaning . when we say that our program will take some space in memory ? or how this thing is technically related to storage .

when we say that our program will take that much of space in memory ... now what do you think technically about it .
    but why creator introduce this concept in programming . this is the nasty question if you are not aware with it .
    now think your program without unallocated space , understand these things .
 
                               total space in memory = 2000
1st program       1. 1st instruction executed and take 100th place in memory
                          2. 2nd instruction comes and takes 1900th space in memory .

2nd program      1. 1st instruction and takes 200th place
                           2. 2nd comes and takes 1500th place

now. you are dealing with a space which is commonly shared now if anyone hurts or damaged than seriously other-one will also affected . that is the problem with common space . means this is error generator .anyone in field of address can hurt by anyone .

now think a program with the concept of fixed or given memory spaces .

                      total space = 2000

1st program - 1000 space allocated to it .
         1.  1st instruction comes takes 100 place .
         2.  2nd comes and takes 900 place .

2nd program - 1000 space allocated to it .
        1. 1st instruction comes take 1100 space .
        2 . 2nd instruction comes take 1900 space .

now if here 1st program is affected than this affect will only reside in 0-1000 and 1000-2000 can run easily without any interruption .

affected means in both cases -
in 1st program .... any address can point any thing that may cause problem
but in second program each and every have different spaces and and if anyone is affected than anotherone will remain in safe zone . this concept is introduced in 1970 - 1980 .


Monday 1 August 2011

real example of portability in java .

in this for a hardworker nothing is impossible , but he is failure in only one task ... aaahhh leave this ...
...
come in topic , we all say that java is portable , but i want to ask a question that why java is portable can you give me real world example of portability . some of of surely give a correct answer but some of you know about portability but can not explain why in java . so for you help please read this .

please download this image for proper and solid understanding .