Give one real time application where static variables are used?
Submitted by: AdministratorThinks of a situation where you need to do some work just once in a function irrespective of how many times that function is invoked then u can have a static variable which will keep a track of it. eg int main () { static int once = 0; if (!once) { once++; /*code need to be executed once*/ } /*reset of the code*/ }
Submitted by: Administrator
Submitted by: Administrator
Read Online Programming Concepts Job Interview Questions And Answers
Top Programming Concepts Questions
☺ | Explain how Search engines work? |
☺ | Explain what is port? what is HTTP port, FTP port, Telnet port and others? |
☺ | What is the client business process in electronic industry (in mySAP CRM)? |
☺ | Explain how to get 1,4,7,10.....rows from a table? |
☺ | Write an O(log2(N)) algorithm to find X^N? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |