# \#static-variable

**URL:** https://verificationacademy.com/forums/tag/static-variable/4710.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [Static variable in C have multiple individual copies via DPI-C](https://verificationacademy.com/forums/t/static-variable-in-c-have-multiple-individual-copies-via-dpi-c/34250)

<div class="topic-metadata">

**Author:** [@mlsxdx](https://verificationacademy.com/forums/u/mlsxdx)\
**Replies:** 3\
**Last updated:** [March 26, 2018, 1:02am UTC](https://verificationacademy.com/forums/t/static-variable-in-c-have-multiple-individual-copies-via-dpi-c/34250 "2018-03-26T01:02:11Z")

</div>

Hi, Can someone help to solve a issue that keeping multiple individual copies for static variable in C through DPI-C calls? Basically, for static variable is stored in the statically allocated memory, any method try to…

---

## [How to declare automatic variable in static functions and static variable in automatic functions?](https://verificationacademy.com/forums/t/how-to-declare-automatic-variable-in-static-functions-and-static-variable-in-automatic-functions/32417)

<div class="topic-metadata">

**Author:** [@tvgowthaman](https://verificationacademy.com/forums/u/tvgowthaman)\
**Replies:** 3\
**Last updated:** [October 13, 2016, 5:28pm UTC](https://verificationacademy.com/forums/t/how-to-declare-automatic-variable-in-static-functions-and-static-variable-in-automatic-functions/32417 "2016-10-13T17:28:49Z")

</div>

Can you please tell me how to declare the automatic variable in the static function and vice versa. I know how to declare separately.

---

## [Static variable in parametric class](https://verificationacademy.com/forums/t/static-variable-in-parametric-class/29624)

<div class="topic-metadata">

**Author:** [@Vineet\_Singh](https://verificationacademy.com/forums/u/Vineet_Singh)\
**Replies:** 4\
**Last updated:** [June 23, 2014, 3:25pm UTC](https://verificationacademy.com/forums/t/static-variable-in-parametric-class/29624 "2014-06-23T15:25:46Z")

</div>

class A #(int a = 10); static int b = a; static int c ; endclass module main; A #(30) a1; A #(50) a2; initial begin a1 = new(); a2 = new(); $display (“a1.b =%0d,\\t a2.b=%0d,\\t a1.c= %0d,\\t a2.c = %0d”,a1.b,a2.b…
