DOC PREVIEW
UCLA COMSCI 31 - CS lecture 5

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

string s = ‘Hello’;char c = s[1] // initialized to e ‘e’ ‘ ‘ ‘\t‘ --> tab char‘\n’  new line ‘\’’ ‘\\’ if (t[K] == ‘E’ || ‘e’) //Wrong! But will compile and do the wrong thingchar c = “x”; //ERRORstring c = ‘x’; //ERROR#include <cctype>if (isdigit(num[k]))numberofDigits++;islower(ch)isupper(ch)isalpha(ch) ‘A’ ‘z’if (! isdigit(num[k])) //if num[k] is NOT a digitvoid greet(){ for (int k =1 ; k <=; k++)cout << “Hello” <<end1;}int main(){….…..greet()….}void greet(int nTimes, string msg){for (int k = 1; k <=nTimes; k++)cout << msg << endl;}int main(){……greet(3, “Hello”);  ….int a = 4greet(a + 3, “Ni


View Full Document

UCLA COMSCI 31 - CS lecture 5

Download CS lecture 5
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view CS lecture 5 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view CS lecture 5 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?