what will be the output of the following program, justify?
#define TEST
int TEST getdata()
{
static i;
i+=10;
return i;
}
main()
{
int k;
k = getdata();
}
Answer Posted / rkr
The Static variable is initialized to zero
In the above program
static i; which is equivalent to static i = 0;
Next line i is incrementing by 10, then i value is 10.
return the value is 10
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
What are called c variables?
What is a const pointer in c?
What is the explanation for the dangling pointer in c?
What is the difference between struct and typedef struct in c?
How we can insert comments in a c program?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Explain what are linked list?
why wipro wase
What are the advantage of c language?
What's the best way of making my program efficient?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Difference between macros and inline functions? Can a function be forced as inline?
What is array of structure in c programming?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?