GNG 1106 Study Guide - Final Guide: Operand, Static Variable, Global Variable

509 views3 pages

Document Summary

{} represents a set of commands to be executed. is used for random number generation and malloc. // make comments on the exam for fucks sake. Print function: printf( the value of x is %f , &x); If decision structure: if (logical expression) {} else if (logical expression){} else {} Switch structure: switch(choice) { case 1: { break;} case 2: { break;} default: break;} ** = is an assignment operator, whereas == is a logical expression. For loop: for(initialization; logical expression; counter) {} ex. for (i=0; i<10; i++) {} * break;" will exit any of these loop structures. Function definition: type function_name(parameter list) {} type identifies type of value returned by function and parameter list receives arguments passed to the function, ex. int getfunction( int a, int b) {} Function prototyping: before main function: int getfunction (int, int); Global variable: defined outside of any function, discouraged.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents