CSE 250 Lecture Notes - Lecture 2: Entry Point, Dynamic Array, No Type

54 views3 pages

Document Summary

Hello, world! public static void main (string[] args) { #include int main (int argc, char* argv[]) { std::cout << (cid:862)hello, (cid:449)orld! (cid:863) << std::e(cid:374)dl; return 0; This is sort of like import i. e. we would import java. util. arraylist that way we would only have to type. Boolean value, true (not 0**) or false (0) A character **uses single quotes** (strings use double quotes) Single-precision floating-point number **must use f at the end ** i. e. float fl = 14. 3f; Use sizeof(type) to determine how many bytes in type cout works with all fundamental types: #include int main (int argc, char* argv[]) { We list string as a fundamental type, although it is actually a class (provided by iostream). std::stri(cid:374)g (cid:272)ourse = (cid:862)c e (cid:1006)5(cid:1004)(cid:863); std::(cid:272)out << (cid:862)this is (cid:862) << (cid:272)ourse << std::e(cid:374)dl. << (cid:862)(cid:271) = (cid:862) << (cid:271) << std::e(cid:374)dl; << (cid:862)(cid:272) = (cid:862) << (cid:272) << std::e(cid:374)dl; << (cid:862)i = (cid:862) << i << std::e(cid:374)dl;

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
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents