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
1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END
write algo for cobol program whichuse three flat file to extract some specific information 8 marks mainframe
What is the difference between COM and CORBA?
what is throws keyword
How do you pass variables forwrd to future CECI sessions
what is the certificates in biztalk?
What is dialog programming?
THE CHANNEL IN DATA COMMUNICATION CAN BE?
any drawback are there in mantis?
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)
how to convert the data from HTML file to SAS dataset?
Difference between debugging, running, executing of an application
Given n red balls and m blue balls and some containers, how would you distribute those balls among the containers such that the probability of picking a red ball is maximized, assuming that the user randomly chooses a container and then randomly picks a ball from that.
Write a pseudo code to evaluate a number to any base given (2...16) based on the input. Number greater than 9 should be given as A-F for 10-15.
Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in