Friday 22 March 2013

Related to previous example


    void main()
{
    static int i=i++, j=j++, k=k++;
printf(“i = %d j = %d k = %d”, i, j, k);
}
Answer:
i = 1 j = 1 k = 1
Explanation:
Since static variables are initialized to zero by default.



Blog Author: Vijay Kumar

No comments:

Post a Comment