@kiran Global variables are stored on data segment.
the static variables are stored on heap.
(Tue, Sep 20, 2011 09:07:08 PM)
What is heap? can you segment and static memory storage.
Lalit Singh said:
(Tue, Sep 27, 2011 11:48:36 AM)
The answer to this question is wrong it's option D.
(Wed, Oct 5, 2011 04:19:41 PM)
Can anyone please explain ? How did this answer come ?
(Wed, Oct 5, 2011 10:43:29 PM)
Hut the output is -61 and it is not ASCII value of a so anyone can explain this ans?
(Fri, Oct 7, 2011 07:34:05 AM)
C stores local variables on stack.
Global variables may be declared. These are not stack based. But stored in the data segment.
Rupinderjit Singh said:
(Fri, Oct 28, 2011 09:07:29 PM)
Static variables are stored on stack and Heap is only used for dynamic memory allocation.
(Sat, Dec 17, 2011 06:25:31 PM)
What is heap?
(Sat, Dec 17, 2011 06:28:48 PM)
Please give proper explanation.
(Thu, Jan 5, 2012 11:18:09 PM)
Char takes in pointer so the first byte takes the role but print the int value so the result is the binary value of the first byte.
(Fri, Jan 6, 2012 10:31:24 AM)
Here j is a character pointer, it will hold the address of size 1 byte, but float variable value(3.140000) spread in 4 bytes.
So 1st byte of the float value get printed by the character pointer j.
(Wed, Jan 11, 2012 07:56:32 PM)
Can anyone explain it clearly?
Sk Rashid Ali said:
(Sat, Feb 18, 2012 05:58:43 PM)
If we replace %d with %u its giving an addrress.
Dilip Sharma said:
(Mon, Feb 20, 2012 07:39:14 PM)
j = (char*)&a;
//here j is pointer to char a are declare as 3.14 which is float in third line &a is nothing but the reference of a i.e direct retrived the value 3.14 and cast it as (char*) ;
so here float value are casted.hence it will print the ASCII charactor of first byte.
Vishwas S said:
(Wed, Aug 22, 2012 04:54:56 PM)
Can anyone please explain how 3.14 is stored in a computer?
(Sat, Sep 8, 2012 10:24:26 PM)
which is the 1st byte in 3.140000? 03 or 00?? whatever it is.. ascii value for 0 is 60 and that of 3 is 63.. so how can ans be -61??