About 899,000 results
Open links in new tab
  1. Static Variables in C - GeeksforGeeks

    Jul 23, 2025 · That is why it was able to retain its value between multiple function calls. Syntax The static variable can be simply declared by prefixing the static keyword before the normal …

  2. C | Static Variables | Codecademy

    Feb 5, 2025 · Syntax The syntax for declaring static variables in C is: static data_type variable_name = value; Parameters Where data_type is any valid C data type (int, char, float, …

  3. Static Variables in C - Online Tutorials Library

    Here, datatype represents the type of variable like int, char, float, etc. var is the name of variable given by user. value is any value given to initialize the variable. By default, it is zero. Examples …

  4. Static Variable in C - Delft Stack

    Mar 11, 2025 · This article introduces static variables in C, explaining their usage, benefits, and limitations. Learn how to efficiently retain variable values between function calls and optimize …

  5. Static Variables in C – TheLinuxCode

    May 21, 2025 · A static variable in C is a special type of variable that maintains its value between function calls and throughout the program‘s execution. Unlike regular local variables that get …

  6. Java Static Keyword (With Examples) - Programiz

    In this tutorial, we will learn about the Java static keyword along with static methods, static variables, and static blocks with the help of examples.

  7. C static Keyword - W3Schools

    Definition and Usage The static keyword allows a variable inside a function to keep its value across multiple function calls. C Keywords

  8. C Static Variables: Persistent Local Variables - CodeLucky

    Sep 6, 2024 · Learn about C static variables and how they maintain their state between function calls, enabling you to create persistent local variables in your C programs.