what is difference between static and non-static variables

Answer Posted / udit rawat

static variable take memory first at linking and loading time
while non static variable take memory at compile time

Is This Answer Correct ?    35 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do manipulators do?

768


Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].

820


Can comments be nested?

812


Difference between overloaded functions and overridden functions

824


write a function signature with various number of parameters.

808


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2298


What is the purpose of ios::basefield in the following statement?

1018


How do I exit turbo c++?

785


Do class declarations end with a semicolon?

801


What is c++ stringstream?

864


What are friend classes? What are advantages of using friend classes?

858


What does getch() do according to the ANSI C++ standard a) Reads in a character b) Checks the keyboard buffer c) Nothing in particular (Its not defined there)

800


What is the full form of india?

786


Can I learn c++ as my first language?

852


How a macro differs from a template?

877