freelanceprogrammers.org Forum Index » C

Re: Digest Number 9


View user's profile Post To page top
rocktarzan Posted: Fri Jul 11, 2003 12:10 pm


Joined: 11 Jul 2003

Posts: 1
Re: Digest Number 9
This is in reply to sudarshan_amar@.... Here`s the answer:-
1.#include<stdio.h>#define cube(x)(x*x*x)main(){int i=3;j; => Should be int i=3, j;j=cube(i++); => j=cube(3), i++printf("%d%d",i,j) => i=4, j=27}
2.main(){int *i,j=7;i=(int*)malloc(sizeof(++j));printf("%d",j);}j=8=> printf statement (++j)value of i = system allocated pointer value, allocated size of int. 2 bytes
RegardsSonam Gurung
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help