CISC105 General Computer Science - PowerPoint PPT Presentation

About This Presentation
Title:

CISC105 General Computer Science

Description:

A database is a collection of information stored on a computer. ... can pass structures as parameters in the same way that you pass other data types. ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 8
Provided by: michaelh66
Category:

less

Transcript and Presenter's Notes

Title: CISC105 General Computer Science


1
CISC105 General Computer Science
  • Class 14 07/19/2006

2
Review
  • Strings
  • strcpy(), strncpy() string copy functions
  • strcat(), strncat() string concatenation
  • strcmp(), strncmp() string comparison
  • strlen() string length
  • strtok() string token
  • gets() gets a line of data from the input
  • fgets() gets a line of data from an input file
  • getchar() gets the next character in the buffer
  • fgetchar() get the next character from an input
    file

3
Character Analysis
  • There are many ways to analyze characters
    available in the ctype.h library
  • isdigit, isalpha, islower, isupper, ispunct,
    ispace, tolower, toupper
  • charan1.c charan2.c

4
Introduction to Structures
  • A database is a collection of information stored
    on a computer.
  • The smallest subdivision in a database is a
    record
  • A structure is a data type that contains multiple
    components that you define!

5
Structures
  • Direct Component Selection Operator once you
    declare a structure type you can access a
    component by using structure_name.component
  • See struct1.c
  • A structure can have a component that is a
    structure!
  • See struct2.c

6
Passing structures as Parameters
  • You can pass structures as parameters in the same
    way that you pass other data types.
  • See struct3.c

7
An Array of Structures
  • You can declare and use and array of structures
  • See struct4.c
Write a Comment
User Comments (0)
About PowerShow.com