Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a.

Slides:



Advertisements
Similar presentations
Character Arrays (Single-Dimensional Arrays) A char data type is needed to hold a single character. To store a string we have to use a single-dimensional.
Advertisements

C Language.
 2000 Prentice Hall, Inc. All rights reserved Fundamentals of Strings and Characters String declarations –Declare as a character array or a variable.
C Programming. printf int printf ( const char * format,... ); printf ("Characters: %c \n", 'a'); printf ("Decimals: %d %f\n", 1977, 3.14); specifierOutputExample.
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=
 2000 Prentice Hall, Inc. All rights reserved. Chapter 8 - Characters and Strings Outline 8.1Introduction 8.2Fundamentals of Strings and Characters 8.3Character.
I.1 ii.2 iii.3 iv.4 1+1=. i.1 ii.2 iii.3 iv.4 1+1=
String What it is Why it’s useful library routines for handling strings how to input a string from the keyboard.
WEEK 9 Class Activities Lecturer’s slides.
CS 1150 – JavaScript Programming Lab TA – Sanjaya Wijeratne – Web Page -
AO Made Easy Your guide to using on your office placement.
Input/Output  Input/Output operations are performed using input/output functions  Common input/output functions are provided as part of C’s standard.
Towson University COSC 236
M-files While commands can be entered directly to the command window, MATLAB also allows you to put commands in text files called M- files. M-files are.
An Introduction to Textual Programming
CHAPTER 8 CHARACTER AND STRINGS
A453 Exemplar Password Program using VBA
CNG 140 C Programming (Lecture set 9) Spring Chapter 9 Character Strings.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 8 - Characters and Strings Outline 8.1Introduction 8.2Fundamentals of Strings and Characters 8.3Character.
07/10/ Strings ASCII& Processing Strings with the Functions - Locate (Instr), Mid, Length (Len), Char (ChrW) & ASCII (Asc)
STRING Dong-Chul Kim BioMeCIS UTA 10/7/
STRINGS CMSC 201 – Lab 3. Overview Objectives for today's lab:  Obtain experience using strings in Python, including looping over characters in strings.
CS0004: Introduction to Programming Variables – Strings.
Using iPlan to Submit Documents Fall Registering Your Account in iPlan 2.
Array Cs212: DataStructures Lab 2. Array Group of contiguous memory locations Each memory location has same name Each memory location has same type a.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.
Word Problems that Lead to Inequalities. Word Problem Solving Strategies Read through the entire problem. Highlight the important information and key.
CSE 201 – Elementary Computer Programming 1 Extra Exercises Source: Suggested but not selected midterm questions.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 17 – Flag Quiz Application Introducing One-Dimensional.
CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -
Lesson 6. Python 3.3 Objectives. In this lesson students will learn how to output data to the screen and request input from the user. Students will also.
Chapter 05 (Part III) Control Statements: Part II.
Arrays II (Strings). Data types in C Integer : int i; Double: double x; Float: float y; Character: char ch; char cha[10], chb[]={‘h’,’e’,’l’,’l’,’o’};
A first program 1. #include 2. using namespace std; 3. int main() { 4. cout
Jeopardy Popcorn Words MathPhonicsSentences Letter Naming Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300 Q $400 Q $500 Final Jeopardy.
Employee Video Your inside look at how to use People First.
Scis.regis.edu ● CS-361: Control Structures Week 6 Dr. Jesús Borrego Lead Faculty, COS Regis University 1.
Homework #2: Functions and Arrays By J. H. Wang Mar. 20, 2012.
C++ Programming Lecture 7 Control Structure I (Selection) – Part II The Hashemite University Computer Engineering Department.
Homework #4: Operator Overloading and Strings By J. H. Wang Apr. 17, 2009.
Pay Example (PFirst98) Please use speaker notes for additional information!
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming strings.
Programming Fundamentals I Java Programming Spring 2009 Instructor: Xuan Tung Hoang TA: Tran Minh Trung Lab 03.
Slides from Shane Griffith (TA and guest instructor in Fall 2008) CprE 185: Intro to Problem Solving.
Metadata & File Organization in the CMS Division Web Office biology.ucsd.edu/dwo.
An Introduction to Programming with C++ Sixth Edition Chapter 13 Strings.
1 ENGI 2420 Structured Programming (Lab Tutorial 1) Memorial University of Newfoundland.
Types of Slope Slope is… It is represented by letter ______. Type of Slope Type of Line Equation Example Graph Example.
SCC Student Technology Access Student Login Guide Log on a SCC College Computer Press Ctrl-Alt-Delete keys on the keyboard to access network login Enter.
Declaring variables The type could be: int double char String name is anything you want like lowerCaseWord.
HANGMAN- Software/ Hardware Integration Project Idea was to design a working C++ program to play a Hangman word guessing game Idea was to design a working.
CSCI-1411 F UNDAMENTALS O F C OMPUTING L AB Shane Transue Summer
1 Chapter 7 Pointers and C-Strings. 2 Objectives  To describe what a pointer is (§7.1).  To learn how to declare a pointer and assign a value to it.
Computer Programming Arrays 1. Question #1 2 Question Choose the correct answer..
Formatting in VB Please see speaker notes for additional information!
Introduction to Programming Python Lab 8: Loops 26 February PythonLab8 lecture slides.ppt Ping Brennan
© 2006 Lawrenceville Press Slide 1 Chapter 4 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration.
MICROSFTACCESS tables. DATA TYPES Field TypeWhat It Holds Short Text Text up to 255 characters long (including spaces and punctuation). Use a Text field,
Characters must also be encoded in binary. ASCII maps characters to numbers.
Jeopardy Popcorn Words Letter Naming Math Phonics Sentences Q $100
CS 240 – Computer Programming I Lab
Introduction to Programming
JavaScript, continued.
Start at our website at In the upper right hand corner is a link for “Office 365”
INC 161 , CPE 100 Computer Programming
Introduction to Programming
Class Examples.
Solving Equations 3x+7 –7 13 –7 =.
Introduction to Programming
Presentation transcript:

Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a comment. Please also save each file as lab number and your name. Please submit the zip file of your programs to TA 11/12/2015Lab51

Program I Create random string and store it in char array. String size is also random. dasdSfsbfjhjgDyytSfgdfjkujgAhnvbdfhjkhHJHy dtbfKJHgfd. The string size is (answer). Press any key to continue. 11/12/2015Lab52

Program II Create random string and then convert all lowercase letter to uppercase. dasdSfsbfjhjgDyytSfgdfjk DASDSFSBFJHJGDYYTSFGDFJK Press any key to continue. 11/12/2015Lab53

Program III Create random string and then count how many the character user input are in the string. dasdSfsbfjhjgDyytSfgdfjk Please input a letter: j There are 3 ‘j’s in the string. Do you want to check more?(y/n): y Please input a letter: S There are 2 ‘S’s in the string. Do you want to check more?(y/n): n Press any key to continue. 11/12/2015Lab54

(Option) Program IV Declare char array and initialize with the sentence, “I am a boy. You are a girl.” (not using scanf) Now the program check if the word user input is in the sentence. “I am a boy. You are a girl.” Please input a word: boy(enter) Yes, there is “boy” in the sentence. Do you want to check more(y/n)?y Please input a word: Girl(enter) No, there is no “Girl” in the sentence. Do you want to check more(y/n)?n Press any key to continue. 11/12/2015Lab55