Global variable example

#include <stdio.h> void display(); int n = 5; // global variable int main() { ++n; // variable n is not declared in the main() function display(); return 0; } void display() { ++n; // variable n is not declared in the display() function printf("n = %d", n); }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.