Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

variables in c

#include <stdio.h>
void function(){ 
int x = 20;//local variable 
static int y = 30;//static variable 
x = x + 10; 
y = y + 10; 
printf("
%d,%d",x,y); 
} 
int main() {
 
  function();
  function();
  function();
  return 0;
}
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #variables
ADD COMMENT
Topic
Name
5+8 =