Class14ScopeOfVariables (1).c - #define_CRT_SECURE_NO_WARNINGS#include <stdio.h> Scope of variables(where are values of variables visible in the program

Class14ScopeOfVariables (1).c -...

This preview shows page 1 out of 1 page.

#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> // Scope of variables (where are values of variables visible in the program) // Variables are visible in programming chunks between {} // Variables are visible in the chunks after (){}, e.g. function arguments are visible in the function definition // Global variables (not recommended): Variables outside of any function (including main function) int i=10; // Global variable i (visible to all functions) // User defined function (multiply a number by 2) int MultiplyByTwo(int j); int main(void) { int j = -3, a=-100, b; printf("i=%d\n", i);
Image of page 1
  • Spring '10
  • TAMIWSORGENTE
  • #include, #define, Global variable, Scope of variables

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes