“c Zmienne statyczne” Kod odpowiedzi

c Zmienne statyczne

#include<stdio.h>
int fun()
{
  static int count = 0;
  count++;
  return count;
}
  
int main()
{
  printf("%d ", fun()); // prints 1
  printf("%d ", fun()); // prints 2
  return 0;
}
Dark Dugong

c Zmienne statyczne

int fun(int i);
int main()
{
	int i, j;
	for(i=0;i<=5;i++)
	{
		j = fun(i);
	}
	printf("%d", j);	
}
fun(int i)
{
	static int count = 0;
	count = count + 1;
	return count;
}
Voleti Nagendra kumar

Zmienna statyczna c

#include <stdio.h>
void display();

int main()
{
    display();
    display();
}
void display()
{
    static int c = 1;
    c += 5;
    printf("%d  ",c);
}
SAMER SAEID

Odpowiedzi podobne do “c Zmienne statyczne”

Pytania podobne do “c Zmienne statyczne”

Więcej pokrewnych odpowiedzi na “c Zmienne statyczne” w C

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu