proc() {
static i=10;
printf("%d",i);
}
If this proc() is called second time, what is the output?
Answer Posted / vignesh1988i
if it is called for second time also ,it will be 10 only but
in a different thought....
static keyword is only one time initilization....if the
compailer when again reads the same line it blindly ignores
it and print the latest value of yhat static variable
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
Describe how arrays can be passed to a user defined function
How is a null pointer different from a dangling pointer?
Why can't I perform arithmetic on a void* pointer?
Which control loop is recommended if you have to execute set of statements for fixed number of times?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
How do I get a null pointer in my programs?
What is the use of pointers in C?
Explain what are reserved words?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is the need of structure in c?
What are the advantages of using linked list for tree construction?
How can I implement sets or arrays of bits?
What is string in c language?
List the difference between a "copy constructor" and a "assignment operator"?