“Statische Variable c” Code-Antworten

C statische Variablen

#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

Statische Variable c

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

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

C statische Variablen

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

C statische Variable

static int i;
SAMER SAEID

Ähnliche Antworten wie “Statische Variable c”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen