Answer: </P><P>While in this case for both the programs... the scope and lifetime of variable 'i' is throughout the program..... the value of 'i' is not. For eg. if 'i=2' in the file1.c, any other program accessing this variable from outside will still see the value of i as 2. Whereas in File2.c if the variable 'i' is accessed from any other program its value will always be seen as 0</P><P>Reason: For static variables their values are active only within the COMPILE AREA of where it is declared or in the program where it is declared.
Tags:Global Interview Questions, Kshema Technology, Technical,
Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.
Sponsor Advertisement
Hotel Management System Software
Hotel Management System software is a web based system help to manage reservations, roomstays, bookings, guests, folios, invoices and billing etc. The software features include revenue management, booking calendar, guest relationship management, check-in & check-out, invoices and receipts etc...
No comments:
Post a Comment