what is difference between static and non-static variables

Answer Posted / narender vadhava

static variables have their fix values within a program but
in case of non-static variables their values are changable
within the same program.
syntax of static variable:-
static int s;
while
non static variables declared only by using general basic
data type.
as:-
int s;

Is This Answer Correct ?    14 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is operators in c++?

806


Explain the operation of overloading of an assignment operator.

922


What is name hiding in c++?

903


What things would you remember while making an interface?

794


Can we declare a base-class destructor as virtual?

778


Why do we use double in c++?

824


What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass

944


Why is c++ so fast?

774


What is near, far and huge pointers? How many bytes are occupied by them?

911


What is abstraction in c++ with example?

810


an operation between an integer and real always yeilds a) integer result b) real result c) float result

965


Which one between if-else and switch is more efficient?

844


What is c++ mutable?

909


How do I use arrays in c++?

788


Can union be self referenced?

859