Question : How is static variable stored in the memory? ( if there are 2 functions in a file,and the static variable name is same (ex var) in both the function. how is it keep seperately in the memory).
C++ uses name mangling when storing both local and global static varibales at the same place. The local static variables have function name and the global variables will have file name. Essentially the compiler uses namespace to distinguish between local and global static variables.
If you have the better answer, then send it to us. We will display your answer after the approval.
Hey anybody help me to write code for this program wap which display year,month & day presents in a year for eg. 1. no. is 14 print 2 weeks 2. no is 90 print 3 months 3. no is 365 print 1 year user can input any no