CS 161 Introduction to Programming

Slides:



Advertisements
Similar presentations
1 CS 161 Introduction to Programming and Problem Solving Chapter 9 C++ Program Components Herbert G. Mayer, PSU Status 10/20/2014.
Advertisements

Fungsi Risanuri Hidayat, Ir., M.Sc.. Functions C usually consist of two things: instance variables and functions. All C programs consist of one or more.
Functions Quick Review What is a Function? A module of code that performs a specific job. Examples: Function that determines the maximum of two numbers.
CS1061 C Programming Lecture 10: Macros, Casting and Intro. to Standard Library A. O’Riordan, 2004.
CS 161 Introduction to Programming and Problem Solving Chapter 13 Console IO Herbert G. Mayer, PSU Status 9/8/2014 Initial content copied verbatim from.
CMSC 104, Version 8/061L18Functions1.ppt Functions, Part 1 of 4 Topics Using Predefined Functions Programmer-Defined Functions Using Input Parameters Function.
CS 161 Introduction to Programming and Problem Solving Chapter 13 C++ Preprocessor Herbert G. Mayer, PSU Status 10/8/2014 Initial content copied verbatim.
ECE 103 Engineering Programming Chapter 57 Terminal Control Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
CEG 4131-Fall General Purpose Computing on GPU GPGPU CEG4131 – Fall 2012 University of Ottawa Bardia Bandali CEG4131 – Fall 2012.
Chapter 21: The Standard Library Copyright © 2008 W. W. Norton & Company. All rights reserved. 1 Chapter 21 The Standard Library.
Introduction As programmers, we don’t want to have to implement functions for every possible task we encounter. The Standard C library contains functions.
ECE 103 Engineering Programming Chapter 55 C Math Library Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
Functions: Part 2 of /11/10: Lecture 16 CMSC 104, Section 0101 John Y. Park 1.
GUJARAT KNOWLEDGE VILLAGE Faculty Name:- Prof H.M.Patel Students Name:- SONI VISHAL THAKKER BHAVIN ZALA JAYDIP ZALA.
ECE 103 Engineering Programming Chapter 31 C Scopes Herbert G. Mayer, PSU CS Status 8/1/2015 Initial content copied verbatim from ECE 103 material developed.
21. THE STANDARD LIBRARY. General Rules The C standard library is divided into 15 parts (24 in C99), with each part described by a header. The names of.
ECE 103 Engineering Programming Chapter 7 Compiling C Programs Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.
1 TOPICS TO DISCUSS : FUNCTIONS TYPES OF FUNCTIONS HEADER FILES PRESENTED BY : AVISHEK MAJUMDAR(837837) GUNJAN AGARWAL(856587) SATYAPRIYA DEY(856624)
ECE 103 Engineering Programming Chapter 4 Operators Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material developed.
ECE 103 Engineering Programming Chapter 15 C Standard Library Herbert G. Mayer, PSU CS Status 7/19/2015 Initial content copied verbatim from ECE 103 material.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the basic properties and characteristics of external files ❏ To.
Lecture 5 – Function (Part 2) FTMK, UTeM – Sem /2014.
Chapter 4 SlidesSlide 1 FUNCTIONS IN C – ELEMENTARY PROGRAM STRUCTURE.
UMBC CMSC 104 – Section 01, Fall 2016
Chapter 7 Text Input/Output Objectives
Chapter 7 Text Input/Output Objectives
INC 161 , CPE 100 Computer Programming
Computer Programming Chapter 1: Introduction
Chapter 7 Text Input/Output Objectives
Functions, Part 2 of 2 Topics Functions That Return a Value
Chapter 13 - The Preprocessor
Standard Libraries in C
A First Book of ANSI C Fourth Edition
Input / Output functions in C
CSC215 Lecture Introduction.
Programming Fundamentals Lecture #7 Functions
Deitel- C:How to Program (5ed)
C Basics.
2008/11/10: Lecture 16 CMSC 104, Section 0101 John Y. Park
Chapter 5 - Functions Outline 5.1 Introduction
CSC215 Lecture Introduction.
Introduction to Programming
Input / Output functions in C
Chapter 6 - Functions Outline 5.1 Introduction
بنام خدا زبان برنامه نویسی C (21814( Lecture 4 Chapter 5
C Characters and Strings – Review Lab assignments
Functions, Part 2 of 3 Topics Functions That Return a Value
CSC215 Lecture Introduction.
Dr. Bhargavi Dept of CS CHRIST
Assignment Operators Topics Increment and Decrement Operators
Assignment Operators Topics Increment and Decrement Operators
Topics discussed in this section:
ECE 103 Engineering Programming Chapter 56 Runtime Errors
The Standard Library Chapter 21
Functions in C and C++ CS-2303 System Programming Concepts Hugh C. Lauer (Slides include materials from The C Programming Language, 2nd edition, by Kernighan.
ECE 103 Engineering Programming Chapter 51 Random Numbers
ECE 103 Engineering Programming Chapter 25 C Strings, Part 1
ECE 103 Engineering Programming Chapter 46 argc, argv, envp
ECE 103 Engineering Programming Chapter 37 C Macro Parameters
ECE 103 Engineering Programming Chapter 8 Data Types and Constants
ECE 103 Engineering Programming Chapter 20 Change in Flow of Control
ECE 103 Engineering Programming Chapter 35 C Pointers, Part 1
ECE 103 Engineering Programming Chapter 38 C Pointers, Part 2
CSC215 Lecture Introduction.
Characters and Strings Functions
C Characters and Strings
Assignment Operators Topics Increment and Decrement Operators
Functions, Part 2 of 3 Topics Functions That Return a Value
Functions, Part 2 of 3 Topics Functions That Return a Value
Functions that return a value
Presentation transcript:

CS 161 Introduction to Programming and Problem Solving Chapter 15 C++ Standard Library Herbert G. Mayer, PSU Status 9/8/2014 Initial content copied verbatim from ECE 103 material by prof. Phillip Wong @ PSU

C Standard Library C++ provides standard functions by using external code libraries Before using a library function, its header file must be included (e.g., #include <math.h>) Once a header file is included, all of the definitions, functions, and macros in that library become available to your C source 1

Header Name Std Description (Std: Blank=1989/1990 Standard, NA1=Normative Addendum 1, C99=1999 Standard) Header Name Std Description <assert.h> Contains assert macro for program debugging (do a “man assert” lower case in unix!) <complex.h> C99 For manipulating complex numbers <ctype.h> For character type conversion, upper/lowercase conversion <errno.h> Constants defining error codes <fenv.h> For controlling floating-point environment <float.h> Constants defining Implementation-specific properties of floating-point types <inttypes.h> For conversion between integer types <iso646.h> NA1 For operations involving ISO 646 character sets <limits.h> Constants defining Implementation-specific properties of integer types <locale.h> Location constants <math.h> Contains common mathematics functions <setjmp.h> Contains setjmp and longjmp macros for non-local exits

Header Name Std Description (Std: Blank=1989/1990 Standard, NA1=Normative Addendum 1, C99=1999 Standard) Header Name Std Description <signal.h> For controlling exceptions <stdarg.h> For handling functions with varying number of arguments <stdbool.h> C99 For accessing boolean data type <stdint.h> For defining various integer data types <stddef.h> Contains various definitions and macros <stdio.h> Contains console I/O and file I/O functions <stdlib.h> Misc (e.g., conversion, random numbers, dynamic memory) <string.h> For manipulating strings <tgmath.h> Contains type-generic mathematics functions <time.h> For converting time and date formats <wchar.h> NA1 For manipulating wide characters (e.g., Unicode) <wctype.h> For classifying wide characters 3

Online Resource Searchable online C /C++ library reference: http://www.cplusplus.com/reference/clibrary 4