Give the output of the programvoid main(){char *s="12345sn";printf("%d",sizeof(s));}

6

Showing Answers 1 - 3 of 3 Answers

isha chauhan

  • Mar 22nd, 2006
 

the ans will be 2

that is d size of s which is a pointer

  Was this answer useful?  Yes

amit kumar srivastava

  • Jan 31st, 2007
 

the answer is 4 in gcc compiler because address is also integer types. so it gives size of int and therefore ans is 4.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions