Learners Only
Sunday 30 October 2011
Predict the output or error(s) for the following:
#define int char
main()
{
int i=65;
printf("sizeof(i)=%d",sizeof(i));
}
Answer:
sizeof(i)=1
Explanation:
Since the #define replaces the string
int
by the macro
char
1 comment:
Carroll B. Merriman
3 March 2013 at 03:35
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
1 comment: