Answer Posted / rutuja gaikwad
static variable is a variable which declared inside class
using keyword static.
its value used only in that class not overall program
example:
#include <stdio.h>
void func() {
static int x = 0; // x is initialized only once
across three calls of func()
printf("%d\n", x); // outputs the value of x
x = x + 1;
}
int main(int argc, char * const argv[]) {
func(); // prints 0
func(); // prints 1
func(); // prints 2
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which CRM is better to opt, Sebiel CRM or Salesforce CRM or sap CRM? which institute is best one in hyderabad
Hello...has anyone interviewed with Information Management Services(IMS)located in Silver Spring MD??If yes,what can you share about the programming test and the analytical test?
How to print No.of.rows affected after updation using ADO.Net
why we use abstract word in abstract window toolkit in java language.
When we use Windows authentication mode
How do you initialize a static member of a class with return value of some function?
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)
i am exeprienced person what is selection process
what is the filters in biztakk server? where it can use?
what is the use of occurs 10 or (any number) in the internal table declaration with header line.
Write a shell program. Enter number of days from keyboard. Find out the number of years, month and days it contains
what is meaning of MDM in sap?let me know that meaning
how can we maintain the previous version scripts to new version.
I am taking the bmc control m/enterprise manager 7.0 scheduling test and just wanted to see what kind of questions they would ask or if anyone has taken the test and how long it is for how many questions?
Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe