CPS 196 week 8

CPS 196 week 8 - returns integer—return 0 Arrays in...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
October 17, 11 Functions - Eq: printf, scanf, system (“cls”) - Functions that you have created: int main (void)= special function called by operating system Four things about Functions - Who can call this function (ignore) - Type of value it returns - Its name - The arguments it takes Int main (void) type of value function returns name argument (return 0;) 0 is an integer this is the same When there is nothing to return, use void function doesn’t return anything- no return 0
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: returns integer—return 0 Arrays in Functions asjing for valuje of each for(i=1; i<=numData; i++) Oct 19, 2011 Global variables #include <stdio.h> int x, y; x and y will be available in every part, they are the global variables unlike in code if you declare another x and y locally (above return x+y)—C will pick local variable first Function calling Function i’s are not the same 9 initializes green i plus 5, 4, int x...
View Full Document

This note was uploaded on 02/16/2012 for the course CPS 196 taught by Professor Staff during the Spring '08 term at Syracuse.

Page1 / 3

CPS 196 week 8 - returns integer—return 0 Arrays in...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online